-
-
Notifications
You must be signed in to change notification settings - Fork 442
Fix shell plugin focus issue #3987
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -1,4 +1,4 @@ | ||||||||||||||||||
using System; | ||||||||||||||||||
using System; | ||||||||||||||||||
using System.Collections.Generic; | ||||||||||||||||||
using System.ComponentModel; | ||||||||||||||||||
using System.Diagnostics; | ||||||||||||||||||
|
@@ -412,11 +412,11 @@ private void OnWinRPressed() | |||||||||||||||||
_ = Task.Run(async () => | ||||||||||||||||||
{ | ||||||||||||||||||
Context.API.ChangeQuery($"{Context.CurrentPluginMetadata.ActionKeywords[0]}{Plugin.Query.TermSeparator}"); | ||||||||||||||||||
|
||||||||||||||||||
// Win+R is a system-reserved shortcut, and though the plugin intercepts the keyboard event and | ||||||||||||||||||
// shows the main window, Windows continues to process the Win key and briefly reclaims focus. | ||||||||||||||||||
// So we need to wait until the keyboard event processing is completed and then set focus | ||||||||||||||||||
await Task.Delay(50); | ||||||||||||||||||
await Task.Delay(1000); | ||||||||||||||||||
Context.API.FocusQueryTextBox(); | ||||||||||||||||||
Comment on lines
+419
to
420
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The delay has been increased from 50ms to 1000ms, which is a 20x increase. This significantly impacts user experience by making the application feel unresponsive. Consider a more moderate increase (e.g., 100-200ms) or implement a retry mechanism with shorter delays.
Suggested change
Copilot uses AI. Check for mistakes. Positive FeedbackNegative Feedback |
||||||||||||||||||
}); | ||||||||||||||||||
} | ||||||||||||||||||
|
Uh oh!
There was an error while loading. Please reload this page.