Skip to content

fix: dialog is show when silent is true - #29

Merged
João Moreno (joaomoreno) merged 1 commit into
microsoft:mainfrom
BlackHole1:fix-silent-not-work
Nov 18, 2024
Merged

João Moreno (joaomoreno) merged 1 commit into
microsoft:mainfrom
BlackHole1:fix-silent-not-work

Conversation

@BlackHole1

Copy link
Copy Markdown
Contributor

ShowWindow(hwdn, SW_HIDE) does not work for the dialog (DialogBoxParamW); to achieve silence, it can only be implemented through EndDialog.

Since VSCode is relatively small in size, the dialog disappears quickly (around 200ms) during the upgrade process, so if you don't pay close attention, it goes unnoticed.

Reproduce video(at 6 seconds):

1.mp4

If you want to replicate it locally, you can replace the line

do_update(log, code_path, update_folder_name)?;
with: thread::sleep(std::time::Duration::from_millis(2000));, and then execute:

cargo run -- C:/Users/USERNAME/AppData/Local/Programs/Microsoft\ VS\ Code/Code.exe true "test"

`ShowWindow(hwdn, SW_HIDE)` does not work for the dialog (DialogBoxParamW); to achieve silence, it can only be implemented through `EndDialog`.

Since VSCode is relatively small in size, the dialog disappears quickly (around 200ms) during the upgrade process, so if you don't pay close attention, it goes unnoticed.

Signed-off-by: Kevin Cui <bh@bugs.cc>
@BlackHole1

Copy link
Copy Markdown
Contributor Author

Friendly ping João Moreno (@joaomoreno)

@joaomoreno

Copy link
Copy Markdown
Contributor

That's fantastic, thank you! 👏

@vs-code-engineering vs-code-engineering Bot added this to the November 2024 milestone Nov 18, 2024
@joaomoreno
João Moreno (joaomoreno) merged commit 67d015b into microsoft:main Nov 18, 2024
@BlackHole1
Kevin Cui (BlackHole1) deleted the fix-silent-not-work branch November 19, 2024 00:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants