@bartek

You are right, it works for Firefox. But not for apps created with Qt4,
GTK2 and GTK3.

The reason is Firefox (XUL?) grabs only the mouse pointer and not the
keyboard when displaying a context menu. While the rest of the above
grab both mouse and keyboard, thus overriding separate keyboard grabs
for the shortcuts.

So, to fix this issue we would need to modify Qt (maybe already fixed in
Qt5?) and GTK not to unnecessarily (?) grab the keyboard when displaying
menus.

Please find the 'grabtest' program in the attachment. It checks whether mouse 
and/or keyboard are already grabbed.
Comilation: gcc -lX11 grabtest.c -o grabtest
Test: Run "sleep 3 && ./grabtest" and quickly open a context menu

Results:
1) no context menu:
MOUSE GRAB SUCCEEDED
KEYBOARD GRAB SUCCEEDED
2) Firefox context menu:
MOUSE GRAB FAILED, already grabbed?
KEYBOARD GRAB SUCCEEDED
3) Qt4 context menu (tested with Konsole 4.14.2)
MOUSE GRAB FAILED, already grabbed?
KEYBOARD GRAB FAILED, already grabbed?
4) GTK2 context menu (tested with GIMP 2.8)
MOUSE GRAB FAILED, already grabbed?
KEYBOARD GRAB FAILED, already grabbed?
5) GTK3 context menu (tested with Cheese 3.14.1)
MOUSE GRAB FAILED, already grabbed?
KEYBOARD GRAB FAILED, already grabbed?

-- 
You received this bug notification because you are a member of Kubuntu
Bugs, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/45843

Title:
  Right-click context menu disactivates the very hotkeys (keyboard
  shortcuts) it shows

To manage notifications about this bug go to:
https://bugs.launchpad.net/kde-baseapps/+bug/45843/+subscriptions

-- 
kubuntu-bugs mailing list
kubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kubuntu-bugs

Reply via email to