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

X11: use xcb instead of xlib for xinput features

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: P3: Somewhat important
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 5.12.0 Alpha
    • Component/s: QPA: X11/XCB
    • Labels:
      None
    • Environment:

      Linux

    • Technical Risk:
      Normal

      Description

      In qxcbconnection_xi2.cpp, QXcbConnection::xi2SetupDevices() uses XIQueryDevice(xDisplay, XIAllDevices, &deviceCount) to find the devices. This and all the logic inside the loop could apparently be done with these equivalent xcb structs and functions:

      typedef struct xcb_input_device_info_t {
          xcb_atom_t device_type;
          uint8_t    device_id;
          uint8_t    num_class_info;
          uint8_t    device_use;
          uint8_t    pad0;
      } xcb_input_device_info_t;
      
      typedef struct xcb_input_device_info_iterator_t {
          xcb_input_device_info_t *data;
          int                      rem;
          int                      index;
      } xcb_input_device_info_iterator_t;
      
       * Get the next element of the iterator
       * @param i Pointer to a xcb_input_device_info_iterator_t
       *
       * Get the next element in the iterator. The member rem is
       * decreased by one. The member data points to the next
       * element. The member index is increased by sizeof(xcb_input_device_info_t)
      
      void
      xcb_input_device_info_next (xcb_input_device_info_iterator_t *i );
      
      xcb_generic_iterator_t
      xcb_input_device_info_end (xcb_input_device_info_iterator_t i);
      
      xcb_input_device_info_iterator_t
      xcb_input_list_input_devices_devices_iterator (const xcb_input_list_input_devices_reply_t *R);
      
      

      Then we'd have one less need for using xlib.  An old goal was to get rid of it completely at some point.

        Attachments

          Issue Links

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

            Activity

              People

              • Assignee:
                avolkov Alexander Volkov
                Reporter:
                srutledg Shawn Rutledge
              • Votes:
                0 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes