I m building an app that uses global shortcut keys (using python-keybinder), but there s a problem. The frame pops up and raises properly but doesn t have focus. I have to click on frame.
After I press my keyboard shortcut my frame appears, but it is not focused. I can see that the frame I was focused on previously (e.g. my Firefox frame) still has focus (i.e., the title bar is still white & bold). Only after I click on my app s frame does Firefox s title bar become grey and dim.
I try to SetFocus
and CaptureMouse
but neither do anything. FindFocus
and GetCapture
return None
.
This only happens on Ubuntu (GNOME). On Windows, the frame gets focus immediately. Is there a way to force GNOME to give focus to my app/frame?