Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-96160

When the menu pops up, some shortcut keys fail to respond

    XMLWordPrintable

    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:
      Linux/X11

      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.

       

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            liaqi Liang Qi
            Reporter:
            tanghaixiang haixiang tang
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes