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

QWindow inconsistencies in how properties are reflected to platform window



    • Task
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • None
    • GUI: Window management, QPA
    • None
    • All


      QWindow has inconsistent behavior in when the platform window is told about changes to the QWindow. This is an overview of the current state, for documentation purposes. 

      1. QWindow member updated first, then QPlatformWindow setter called
        • setTitle
        • setFilePath
        • setIcon
        • setOpacity
        • setVisible
        • setParent
      2. QPlatformWindow setter called first, then QWindow member updated
        • setMask
        • setWindowState
        • setFlags
      3. QPlatformWindow setter called if there's a platform window, otherwise QWindow member updated
        • setGeometry
        • setFramePosition
        • resize

      Case #1 has the advantage that the QWindow is always reflecting the current state, but also means that if the platform window wants to know the previous state it needs to store that manually.

      Case #2 has the opposite siutation: the platform window can ask for window()->foo() in the setter to get the current/old state, and compare to the incoming new state. But at the same time, the platform window might accidentally apply the window() state directly, applying the old state.

      Case #3 is a special case of #2, where the QWindowPrivate geometry member isn't updated until the platform comes back via QWSI into QGuiApplicationPrivate::processGeometryChangeEvent. This means we don't emit x/y/width/height change signals synchronously like we would for normal Qt properties.

      Ideally we'd clean all of this up, but existing platform plugins rely on the existing semantics, so would need careful surgery 


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



            vestbo Tor Arne Vestbø
            vestbo Tor Arne Vestbø
            0 Vote for this issue
            1 Start watching this issue



              Gerrit Reviews

                There are no open Gerrit changes