This could be X windows or XFCE related, sorry I have no idea.
geany -V; geany 1.36 (built on 2020-03-22 with GTK 3.24.14, GLib 2.64.1) OS is Mint 20.3 Una XFCE edition
To reproduce;
- open geany - type "a" in untitled - ctrl-n - press and hold ctrl-tab to switch tabs, release tab key but keep ctrl key held down till popup shows - click any menu - release ctrl - Now popup is stuck as always on top until geany is closed
See attached screen capture for example (you may need to download it first to view)
https://user-images.githubusercontent.com/72730470/200763465-e06bbdc2-bba1-4...
Now popup is stuck as always on top until geany is closed
Or you do ctrl+tab again
Probably a GTK thing, Geany does not create that popup itself.
No, this is our problem and I did run into it many times now. The problem is that when you press Ctrl+click and the popup shows and you do something else that makes Geany lose focus, the Ctrl release isn't registered by Geany and the popup gets stuck forever.
We should also check whether the Geany window lost focus and hide the popup in this case.
The problem is that when you press Ctrl+click
Ctrl+Tab??
Ctrl+Tab??
Yes.
Also happens if you e.g. switch windows or workspace while holding <kbd>Ctrl</kbd> -- and this is entirely out of our control.
@b4n Is there anything else other than the `focus-out-event` signal we could use? When I tested it in #3907, the signal was fired when the window lost focus for some "real" window such as a dialog but not for the case reported by OP here with the menus. To be precise, I connected `main_widgets.window` because we cannot connect every possible widget in the main window and then `focus-out-event` is fired only when focus truly leaves the main window for some other window.
But maybe even if we aren't able to fix the menu item click problem, `focus-out-event` fixes most of the other situations so it might still be worth adding (don't look much at #3907, it's not completely right).
Also happens if you e.g. switch windows or workspace while holding Ctrl -- and this is entirely out of our control.
I'd expect `focus-out-event` would be fired in this case, right?
@techee I don't see a neat solution (after trying several things) apart from grabbing events so the situation in the OP doesn't happen. I shamelessly pushed to #3907 with something that seems to work for me. Note that I didn't try with a dialog popping up out of nowhere though, but I guess it would work.
github-comments@lists.geany.org