Details
-
Type:
Bug
-
Status: Closed
-
Priority:
P3: Somewhat important
-
Resolution: Out of scope
-
Affects Version/s: 6.1.0
-
Fix Version/s: None
-
Component/s: QPA: X11/XCB
-
Labels:None
-
Platform/s:
Description
When the Qt program displays the menu, we use some shortcut keys, such as win+L to lock the screen, these shortcut keys will be invalid. I have tested Debian、Ubuntu、 Arch. But the GTK program behaves normally.
The reason is that https://github.com/qt/qtbase/blob/dev/src/plugins/platforms/xcb/qxcbconnection.cpp#L787 The xcb_grab_server function is called, I did not find a detailed description of this function, I don’t understand why To call it.
I checked the similar Xlib function XGrabServer(https://bitfreedom.com/man/index.php/man/XGrabServer/3). It tells us not to call this function under special circumstances. So is this a mistake?
Run the following code, this is a very simple Qt project, and then let the menu display, then you will find that your computer cannot lock the screen.