quickshell icon indicating copy to clipboard operation
quickshell copied to clipboard

PanelWindow does not calculate exclusiveZone correctly

Open Pieterv24 opened this issue 5 months ago • 1 comments
trafficstars

Recently after a update, I've found that my Top bar, reserved more space than it should. This was working correctly before, however after a update, this issue started occurring.

Image

I've narrowed my issue down to the following commit: https://git.outfoxxed.me/quickshell/quickshell/commit/edfc4c681c7f6981b5b6c1063c4a051552eb1d7e

it seems like for some reason the exclusiveZone is not being calculated correctly.

setting the property exclusiveZone to the height of my bar explicitly, fixes my issue. However when exclusionMode is Auto, and exclusiveZone is not explicitly set, too much space is taken.

Pieterv24 avatar May 27 '25 19:05 Pieterv24

Can you send a sample that reproduces the issue? (or your entire config, doesn't matter)

outfoxxed avatar May 27 '25 20:05 outfoxxed

Can you send a sample that reproduces the issue? (or your entire config, doesn't matter)

Yes, I've tried to make is as simple/small as possible, in a way it still reproduces the issue.

import Quickshell
import Quickshell.Wayland

ShellRoot {
  Variants {
    model: Quickshell.screens

    Scope {
      property var modelData

      PanelWindow {
        property real barHeight: 40
        
        anchors {
          top: true
          left: true
          right: true
        }

        // If implicitHeight is set by the property, the issue occurs
        implicitHeight: barHeight
        // height: barHeight
        // However when exclusiveZone is set to the same value, it is fixed
        // exclusiveZone: barHeight

        // Another weird case, is that if implicitHeight is set directly instead of using a property
        // The issue does not occur, and exclusiveZone does not need to be set
        // implicitHeight: 40
        // height: 40

        color: "blue"

        WlrLayershell.layer: WlrLayer.Overlay
      }
    }
  }
}

After some experimenting trying to make a simple reproducible config, I've found that the issue only occurs when height or implicitHeight is set from a property. If it's set directly, the issue is not there.

When height/implicitHeight is set from a property, setting exclusiveZone from either the same property, or directly also fixes the issue.

Pieterv24 avatar May 28 '25 07:05 Pieterv24

Should be fixed. Thanks for providing a nice reproducible sample/testing!

outfoxxed avatar May 28 '25 09:05 outfoxxed