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

Add QWindow APIs to manage relative window stacking order

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • Some future release
    • GUI: Window management
    • None
    • All

    Description

      The relative stacking order between QWindows is not properly defined, nor easily controlled.

      You can raise() or lower() a window, but that will bring it to the top or bottom of the stack. To ensure a consistent ordering between 3 windows you need to raise or lower them in a loop. A problem with this is that raising() all 3 windows will also raise them above other application windows that they might have been behind originally. Ie there's no way to go from:

      • QWindow 1
      • QWindow 2
      • Other app window
      • QWindow 3

      to

      • QWindow 2
      • QWindow 1
      • Other app window
      • QWindow 3

      as today that will result in

       

      • Other app window
      • QWindow 2
      • QWindow 1
      • QWindow 3

      The inability to selectively raise or lower windows relative to each other is also problematic due to how stacking order is set up initially. 

      One would think it would be the order of setParent calls, but those parent relationships are not reflected until the platform window is created. And the creation order of sibling windows may not be the same as the original setParent call order.

      Without a way to set relative stacking for individual windows one is left to carefully control the creation order of windows, which is fragile.

      Platform APIs that could back this:

      • macOS: [NSWindow orderWindow:relativeTo:] and [NSView addSubview:positioned:relativeTo:]

      Attachments

        Issue Links

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

          Activity

            People

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

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes