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

Windows messages sent twice to event filters, WM_CHAR missing completely

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P4: Low P4: Low
    • 5.11.1
    • 5.10.1
    • QPA: Windows
    • None
    • Windows 10 64-bit

      Visual Studio 2015 Update 3

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

      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...

        1. output.txt
          0.5 kB
          Michael Kostukov
        2. TestMessaging.zip
          4 kB
          Michael Kostukov
        3. qtbug67095_log.txt
          111 kB
          Friedemann Kleint
        4. qtbug67095_diag.diff
          3 kB
          Friedemann Kleint
        5. qtbug67095.zip
          3 kB
          Friedemann Kleint
        6. qtbug67095_diag2.diff
          4 kB
          Friedemann Kleint
        7. qtbug67095_widgets.zip
          2 kB
          Friedemann Kleint
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes