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

QEvent::MouseButtonPress, QEvent::MouseButtonRelease should provide ALL button-numbers passed in corresponding X11 events (integer, 1-32)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • Not Evaluated
    • None
    • 4.8.0
    • Core: Event loop
    • None
    • qt-x11.

      My own computer runs Linux, and I do have a "gamer" mouse. X11 and GTK2-based programs which listen for them, e.g., Compiz WM, see all buttons.

    Description

      For many years, KDE Devs and Bug responders have been "blaming" qt for limiting the number of buttons on a mouse to only 5. (And two of those buttons were defined quite recently.) qt Devs and bug responders, in turn, "blame" X11. But X11 is actually using the "unsigned int button" field as an unsigned integer, and appears (on my first glance) to be using integer math for working with it: For example, a new update which assures that the maximum button number which X11 will emit in one of these events, for a MOUSE, is not larger than 32.

      Attached is the X11 typedef from their current code. But within qt, Qt::MouseButton appears to be a bitmask, rather than a uint: matching the "we only have 5 buttons for bit mask!" problem, which really DOES go all the way down to X11.

      I am unsure where this conversion occurs in qt code; and the size of the existing enum when compiled for qt target platforms. (Or whether we could create a scheme to a subclass, while still providing BC safety). I'd LOVE to do the "heavy lifting" on this project, but I'll need a little bit of coaching.

      Attachments

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

        Activity

          People

            earthdomain Earth Domain (Inactive)
            rickst29 Richard Stockton
            Votes:
            4 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes