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

WM_QT_SENDPOSTEDEVENTS suppresses MFC's idle processing

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • Not Evaluated
    • None
    • 5.14.1
    • Other
    • None
    • Windows

    Description

      #include <afxwin.h>
      
      #include <QMfcApp>
      
      #include <QDebug>
      #include <QScopeGuard>
      #include <QWidget>
      
      class Application : public CWinApp
      {
      public:
        int Run() override
        {
          QMfcApp::instance(this);
          QMfcApp::setQuitOnLastWindowClosed(true);
          auto deleter = qScopeGuard([] { delete qApp; });
      
          QWidget window;
          window.show();
      
          return QMfcApp::run(this);
        }
      
        BOOL OnIdle(LONG count) override
        {
          qDebug() << "idle";
          return CWinApp::OnIdle(count);
        }
      };
      
      Application application;

      (QMfcApp is a class from the Qt Solutions.)

      With Qt 5.13 there is a plenty of OnIdle calls.
      With Qt 5.14 you have to resize the window or open its system menu to get some of those.

      I can see that now the message queue almost always has a WM_QT_SENDPOSTEDEVENTS in it, so PeekMessage succeeds and OnIdle is not called.

      Attachments

        Issue Links

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

          Activity

            People

              Unassigned Unassigned
              a.khlyustov a.khlyustov
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes