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

Windows messages sent twice to event filters, WM_CHAR missing completely

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4: Low
    • Resolution: Done
    • Affects Version/s: 5.10.1
    • Fix Version/s: 5.11.1
    • Component/s: QPA: Windows
    • Labels:
      None
    • Environment:
      Windows 10 64-bit

      Visual Studio 2015 Update 3

      Qt 5.10.1
    • Commits:
      a0a22037cdacbf51a2db560ff902a5a341561b15 (qtbase/5.11. 23.4.2018,5.11)

      Description

      When registering native event filters on Windows - each mouse and keyboard event is duplicated. Othe the other hand, some events like WM_CHAR are "swallowed". I see the following output in logging for every event (left mouse button clicked, then one character typed):

      WM_LBUTTONDOWN
      WM_LBUTTONDOWN
      WM_LBUTTONUP
      WM_LBUTTONUP
      WM_KEYDOWN
      WM_KEYDOWN
      WM_KEYUP
      WM_KEYUP

       

      While plain C WinAPI message loop logging results in:

      WM_LBUTTONDOWN
      WM_LBUTTONUP
      WM_KEYDOWN
      WM_CHAR
      WM_KEYUP

       

       

      The test project (find attached) is a basic QML project using Visual Studio 2015 32-bit for building. It creates single blank ApplicationWindow and registers object of class inheriting from QAbstractNativeEventFilter using QApplication::installNativeEventFilter.

      The issue is serious since we have some 3rd party components that depend on correct handling of native windows events and the current message loop seems messed up...

        Attachments

        1. output.txt
          0.5 kB
        2. qtbug67095_diag.diff
          3 kB
        3. qtbug67095_diag2.diff
          4 kB
        4. qtbug67095_log.txt
          111 kB
        5. qtbug67095_widgets.zip
          2 kB
        6. qtbug67095.zip
          3 kB
        7. TestMessaging.zip
          4 kB

          Issue Links

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

            Activity

              People

              Assignee:
              kleint Friedemann Kleint
              Reporter:
              r0ll1ngst0ne Michael Kostukov
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes