Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: dialog is show when silent is true #29

Merged
merged 1 commit into from
Nov 18, 2024

Conversation

BlackHole1
Copy link
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
Contributor Author

Friendly ping @joaomoreno

@joaomoreno
Copy link
Member

That's fantastic, thank you! 👏

@joaomoreno joaomoreno enabled auto-merge (squash) November 18, 2024 14:09
@vs-code-engineering vs-code-engineering bot added this to the November 2024 milestone Nov 18, 2024
@joaomoreno joaomoreno self-assigned this Nov 18, 2024
@joaomoreno joaomoreno merged commit 67d015b into microsoft:main Nov 18, 2024
2 of 3 checks passed
@BlackHole1 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