pop-os / cosmic-comp

Compositor for the COSMIC desktop environment
GNU General Public License v3.0
418 stars 51 forks source link

Stacks don't display properly when small fixed-size window is focused #592

Open ids1024 opened 1 week ago

ids1024 commented 1 week ago

If something like cosmic-applet-battery is run in a stack, the result is this:

screenshot-2024-07-02-02-15-07

Even though the stack is seemingly given the whole space, the stack header bar is only given the same size as the applet.

Probably an issue with how geometry() is defined for stacks...

Drakulix commented 6 days ago

Probably an issue with how geometry() is defined for stacks...

More an issue with how the client responds. It is obviously valid to submit a too small buffer, but cosmic-comp expects the client to obey the tile-size. Not using the acknowledged size leads to weird artifacts during resizing.

Maybe we need to track the size we last configured and if the client has ack'd that without updating it's dimensions to fix these cases...

ids1024 commented 6 days ago

Or yeah, it could be the size of the buffer the client attaches. Haven't tested exactly what the cause is yet.

However exactly it works, probably the tab header bar here should render with the width of the tile regardless of the size of the focused window. Even if the client is doing things wrong, that shouldn't break usability of the whole stack.

Drakulix commented 5 days ago

However exactly it works, probably the tab header bar here should render with the width of the tile regardless of the size of the focused window. Even if the client is doing things wrong, that shouldn't break usability of the whole stack.

That causes glitches during resizes. If we want to do that, we need to store something like the "last acknowledged tab-size" and at least wait for the next ack_configure-event before using a new width. This gives the window at least one chance at providing a matching buffer.