Skip to content

autohide-window : add margins to the opposite edge if autohide is disabled#468

Open
AKArien wants to merge 1 commit into
WayfireWM:masterfrom
AKArien:biface-margins
Open

autohide-window : add margins to the opposite edge if autohide is disabled#468
AKArien wants to merge 1 commit into
WayfireWM:masterfrom
AKArien:biface-margins

Conversation

@AKArien
Copy link
Copy Markdown
Collaborator

@AKArien AKArien commented Jun 1, 2026

The margins being mostly a matter of style, i propose that if a margin is applied and autohide is disabled, space is reserved on both sides of the window.

For this, we would normally apply the same margin to the opposite edge of the edge on which the panel is placed.

However, wayfire 0.10.1 with gtk4-layer-shell 1.3 has a bug where auto exclusive zone doesn’t account for the margin size, which causes shell toplevels to go outside of the reserved space. For now, adding a margin on the opposite side prevents this overlap.
Wayfire issue : WayfireWM/wayfire#3038

We can hack around this bug by simply doubling the requested opposite margin. Since the problem occurs with wayfire’s latest stable version and we are looking to a release of wf-shell 0.10.1 any time, we could do this and change it to only request the normal margin once the bug is fixed in wayfire. However, this would look jarring on non-wayfire desktops.

example of what things look like currently :
image

with this patch applied (on wayfire) :
image

if we request twice the margin for wayfire, the intended behaviour, and what it looks like on other compositors with this patch :
image

@AKArien AKArien force-pushed the biface-margins branch 2 times, most recently from 9633c68 to 18b1485 Compare June 2, 2026 00:11
@soreau
Copy link
Copy Markdown
Member

soreau commented Jun 2, 2026

It doesn't make sense to me, why you would want to workaround a bugged library version.

  1. The bug should be fixed upstream.
  2. This is not a good habit to make.
  3. We can lock our gtk4-layer-shell version that is working as is.

@AKArien
Copy link
Copy Markdown
Collaborator Author

AKArien commented Jun 2, 2026

1. The bug should be fixed upstream.

This is the intention, this behaviour is mainly aimed at the would-be correct behaviour, and happens to be less bad until it is

3. We can lock our gtk4-layer-shell version that is working as is.

The current version is « not working »

@AKArien AKArien marked this pull request as draft June 4, 2026 10:16
…abled

The margins being mostly a matter of style, this makes it so that if a margin is applied and autohide is disabled, space is reserved on both sides of the window.

However, wayfire 0.10.1 with gtk4-layer-shell 1.3 has a bug where auto
exclusive zone doesn’t account for the margin size, which causes shell
toplevels to go outside of the reserved space. Until this is fixed, on wayfire,
this patch only prevents overlap and doesn’t cause the intended behaviour

Wayfire issue : WayfireWM/wayfire#3038
@AKArien AKArien marked this pull request as ready for review June 4, 2026 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants