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

[Dev] Fix shell win+r too slow to appear/does not appear when triggered #1606

Merged
merged 7 commits into from
Dec 12, 2022

Conversation

taooceros
Copy link
Member

@taooceros taooceros commented Dec 8, 2022

Shell plugin delegate of win+r is too slow to be a valid hook when triggered (we should largely adjust that part of code later), this pr add a Task.Run to run the slow part.

Also the Show method is not safe when triggered by threadpool, so the temporary fix is to wrap a Dispatcher.Invoke around it.

Also potentially fix sound effect sometimes disappear due to threadpool thread execute show method.

Test

  • win+r works
  • The window is at the right position
  • Sound effect preserved

To reproduce an exception for the sound effect

  1. Use a Task.Run wrap a IPublicAPI.ShowMainWindow()
  2. Then you may notice that the sound disappear or an exception throw without the fix

Close #1584

… window and change the query (which is semislow)
@taooceros taooceros requested a review from jjw24 December 8, 2022 03:16
@taooceros taooceros changed the title Fix shell win+r issue and sound effect sometimes disappear Fix shell win+r issue and potentially fix sound effect sometimes disappear Dec 8, 2022
@taooceros taooceros changed the title Fix shell win+r issue and potentially fix sound effect sometimes disappear Fix shell win+r issue Dec 8, 2022
@taooceros
Copy link
Member Author

taooceros commented Dec 11, 2022

@gissehel may you give this pr a test? I think we may not need the dispatcher priority if execute everything in the main thread.

https://ci.appveyor.com/project/JohnTheGr8/flow-launcher/builds/45648485

@jjw24 jjw24 enabled auto-merge December 12, 2022 09:14
@jjw24 jjw24 added the bug Something isn't working label Dec 12, 2022
@jjw24 jjw24 modified the milestone: 1.10.0 Dec 12, 2022
@jjw24 jjw24 changed the title Fix shell win+r issue [Dev] Fix shell win+r issue Dec 12, 2022
@jjw24 jjw24 changed the title [Dev] Fix shell win+r issue [Dev] Fix shell win+r too slow to appear/does not appear when triggered Dec 12, 2022
@jjw24 jjw24 merged commit 6dd34b9 into dev Dec 12, 2022
@jjw24 jjw24 deleted the fix_shell_and_change_query branch December 12, 2022 09:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Dev] BUG: Win+R still call the system "run" out
2 participants