Details
-
Bug
-
Resolution: Out of scope
-
P3: Somewhat important
-
None
-
6.1.0
-
None
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.