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

Grab keyboard/mouse not possible on xcb plugin

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 5.4.1
    • 5.4.0 RC
    • QPA: X11/XCB
    • None

    Description

      Since a7111c5ddef3072eb73c08f14823343208c18f3c the xcb plugin supports the -dograb and -nograb arguments. Unfortunately the implementation causes the QXcbConnection to be created with no grab support if neither of the arguments is provided.

      Possible patch:

      diff --git a/src/plugins/platforms/xcb/qxcbintegration.cpp b/src/plugins/platforms/xcb/qxcbintegration.cpp
      index 3818494..6369cbe 100644
      --- a/src/plugins/platforms/xcb/qxcbintegration.cpp
      +++ b/src/plugins/platforms/xcb/qxcbintegration.cpp
      @@ -165,7 +165,7 @@ QXcbIntegration::QXcbIntegration(const QStringList &parameters, int &argc, char
                      "\t Use the -dograb option to enforce grabbing.");
           }
       #endif
      -    m_canGrab = (!underDebugger && noGrabArg) || (underDebugger && doGrabArg);
      +    m_canGrab = (!underDebugger && noGrabArg) || (underDebugger && doGrabArg) || (!underDebugger && !noGrabArg && !doGrabArg);
       
           static bool canNotGrabEnv = qEnvironmentVariableIsSet("QT_XCB_NO_GRAB_SERVER");
           if (canNotGrabEnv)
      

      Attachments

        For Gerrit Dashboard: QTBUG-43049
        # Subject Branch Project Status CR V

        Activity

          People

            jolind Jorgen Lind
            mgraesslin Martin Gräßlin
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes