-
Notifications
You must be signed in to change notification settings - Fork 19
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
Popups Vanishing #91
Comments
That is the intended behaviour at the moment. When using keyboard navigation the popup subscribes to some hooks which will kill the window if it loses focus. This is the relevant code: qtile-extras/qtile_extras/popup/toolkit.py Lines 202 to 219 in 159eb19
So, we would just need an optional parameter to disable the hooks. If you comment out line 203, does it work as expected/desired? |
I tried commenting out line 203 as you suggested. It did not have any effect on the behavior of the Popup. |
Commenting out line 203 fixes the issue for me. Can you try again? |
I have tried again. Simply commenting out line 203 and then writing the file and reloading qtile does not do anything for me. I have also tried commenting out the entire set_hooks() function, but that also did nothing. |
What do you mean by "reloading"? Are you completely exiting qtile? |
No, just using a keybinding to call lazy.reload_config() |
That won't work. You'll need to exit qtile to load the new code. You're not changing your config. |
Yes, that worked. I had figured that reloading the config would work due to the popup being defined in the config, but I understand now. |
Ok, let me play around with this. May see if we can have an option to disable those hooks rather than you having to hard code it. |
Whenever I make a Popup that has focusable widgets, it will disappear whenever I move my mouse off of the popup. It will also disappear if a new window appears. This never happens if no controls can be focused.
This is the code I have used to define my Popup:
This Popup will stay.
However, If I add a mouse callback, like so:
This will disappear if I move the mouse off of the Popup, or if a new window appears.
I have noticed while writing this, that the Popup also disappears if the focus of the windows is changed, which if I have the follow_mouse_focus property set as true, in the qtile config, would explain why the popup disappears when my mouse moves off of the Popup. It would also explain why if a new window appears why the popup will also disappear.
Again none of this happens if the popup has no focusable controls.
The text was updated successfully, but these errors were encountered: