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

Windows: WM_USER to a different HWND in the message queue does not turn on the socket notifiers again

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 5.9.2
    • 5.9.1
    • Core: Event loop
    • None
    • msvc2015
    • 7c2850cd8f1029b74d960fad5754320b61176f46 (qtbase/5.9/31.7.2017, 5.9.2)

    Description

      problem: sporadically there are no more "readyRead" signals from QTcpSocket, even though there is data sent to the socket

      I manage to track it to the proccessing of WM_QT_ACTIVATENOTIFIERS in qeventdispatcher_win.cpp (see Attachment):
      the socket notifiers do not get registered again because a WM_USER message to a different HWND is found by PeekMessage at qtbase\src\corelib\kernel\qeventdispatcher_win.cpp:210 .

      cause: the 2nd param of PeekMessage is "0" (=look for any window of the current thread)
      and on the other hand WM_QT_SOCKETNOTIFIER = WM_USER(1024) is a widely-used customized window message   

      proposal to fix: the 2nd param to PeekMessage should be "d->internalHwnd" instead of "0", souldn't it?

       

      Attachments

        Issue Links

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

          Activity

            People

              kleint Friedemann Kleint
              reiteran Anton Reiter
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes