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

Add a convenience APIs for handling xcb_ge_event_t

    XMLWordPrintable

Details

    • Task
    • Resolution: Done
    • P4: Low
    • None
    • None
    • QPA: X11/XCB
    • None

    Description

      QT_XCB_NO_XI2_MOUSE is deprecated, for more details see https://codereview.qt-project.org/#/c/197736/

      QT_XCB_NO_XI2_MOUSE was introduced so that user code that handles native events, particularly the core mouse events would continue working as before. Introduction of QT_XCB_NO_XI2_MOUSE was a mistake. Handling native events is not a part of public API, user should expect to use #ifdefs at this level if something changes between Qt versions. Or disable extension via QT_XCB_NO_XI2, but that has trade-offs.

      To make transitioning from core to XInput2 events simpler, we can add a helper function ::prapareXcbGenericEventForXlib (but possibly with a better name ) as there are incompatibilities between memory layout between xcb and xlib events. And ::isXInput2Event, as there are incompatibilities between libxcb versions and checking this with native code can be cumbersome.

      This function can be exposed via http://doc.qt.io/qt-5/qguiapplication.html#platformFunction and be documented in QAbstractNativeEventFilter and QX11Extras.

      Note, that libxcb recently enabled by default xcb's xinput API. If users are utilizing this API, then the memmove step (as done by ::prapareXcbGenericEventForXlib ) would not be necessary.

      commit d10194a321c3db851b3ede9a98cdc95e951943aa
      Author: Christian Linhart <chris@demorecorder.com>
      Date:   Sat Mar 11 22:03:34 2017 +0100
      
          enable xinput by default
          
          Support for the xinput extension is complete now,
          as far as I can tell.
          
          According to our discussion on the list, we enable it now.
          
          Signed-off-by: Christian Linhart <chris@demorecorder.com>
      

      Attachments

        Issue Links

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

          Activity

            People

              paeglis Gatis Paeglis
              paeglis Gatis Paeglis
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes