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

Calling onTabSelected() breaks tab switching #2788

Closed
Alien-lv426 opened this issue Jul 21, 2024 · 3 comments · Fixed by #2791
Closed

Calling onTabSelected() breaks tab switching #2788

Alien-lv426 opened this issue Jul 21, 2024 · 3 comments · Fixed by #2791
Labels

Comments

@Alien-lv426
Copy link

It seems that overriding the onTabSelected function results in tabs not switching any more using either the tab key, or a defined hotkey. Control right/left in my case.

To reproduce, create a new script function like this. It doesn't even have to do anything.

var onTabSelected_ = onTabSelected
 onTabSelected = function() {
       onTabSelected_()
} 

Then try and switch tabs. I expected the tabs to switch as before, ie Tab and the defined shortcut keys would still work.
With the function defined only a mouse double click will switch tabs.

Copyq 9.0.0 on Windows 11 Build 22631

Thank you.

hluk added a commit that referenced this issue Jul 25, 2024
Redrawing GUI seems to get stuck when nested event loop is started while
waiting on `onItemsLoaded()`.

Solution is not to wait on the function to finish.

Fixes #2788
@hluk
Copy link
Owner

hluk commented Jul 25, 2024

Thanks for the report! Fixing in #2791.

hluk added a commit that referenced this issue Jul 25, 2024
Redrawing GUI seems to get stuck when nested event loop is started while
waiting on `onItemsLoaded()`.

Solution is not to wait on the function to finish.

Fixes #2788
@hluk
Copy link
Owner

hluk commented Jul 25, 2024

New Windows build with the fix is here: https://ci.appveyor.com/project/hluk/copyq/builds/50283807/artifacts

@Alien-lv426
Copy link
Author

Works great. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants