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

Order of QWindow expose and activation not specified

    XMLWordPrintable

    Details

      Description

      As far as I can tell, there's no formal order defined for whether a window will receive an expose event or window activation event first.

       

      qtestlib has both qWaitForWindowActive and qWaitForWindowExposed, and they are used interchangeably in test code for "wait for the window to be ready".

      This is a problem for tests that should qWaitForWindowExposed, but call qWaitForWindowActive thinking activation happens after expose, and run on a platform where that's not the case.

      We should either formalize it, and make platforms behave, or add a testlib function to qWaitForWindowReadyAndMappedAndGeometryStable, etc etc.

      On macOS we end up with active before exposed because we send window activation from both aa[QNSView becomeFirstResponder] and QCocoaWindow::windowDidBecomeKey(). We should probably only do the latter, which happens after expose.

       

       

        Attachments

          Issue Links

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

            Activity

              People

              Assignee:
              vestbo Tor Arne Vestbø
              Reporter:
              vestbo Tor Arne Vestbø
              PM Owner:
              Veli-Pekka Heinonen Veli-Pekka Heinonen
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:

                  Gerrit Reviews

                  There are no open Gerrit changes