Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gtk-layer-shell exclusive zones do not appear to work #1285

Closed
spl237 opened this issue Dec 6, 2023 · 8 comments
Closed

gtk-layer-shell exclusive zones do not appear to work #1285

spl237 opened this issue Dec 6, 2023 · 8 comments
Labels
bug Something isn't working PR pending PR to fix the issue is already pending
Milestone

Comments

@spl237
Copy link
Contributor

spl237 commented Dec 6, 2023

With the Raspberry Pi Desktop, the panel window is set to be an exclusive zone using gtk-layer-shell, and when run under wayfire, the desktop background and associated icons are pushed down so that the panel does not cover them.

Under labwc, this doesn't happen - the panel overlays the desktop and covers icons at the top of it.

Are exclusive zones not supported, or is this likely to be a bug in the implementation of the panel as one?

@Consolatis
Copy link
Member

Consolatis commented Dec 6, 2023

Labwc does support layershell exclusive zones. But labwc does not prevent windows to be on top of it / under it when manually positioned. We do prevent automatically calculated geometry like maximized / tiled windows to overlap the exclusive zone however. How exactly is the "desktop background with icons" positioned and sized / does it use layershell as well?

@spl237
Copy link
Contributor Author

spl237 commented Dec 6, 2023

The desktop is a layer-shell window which is anchored to all four edges of the screen and set to the background layer; the panel is a layer-shell window which is anchored to either the top or bottom of the screen and with exclusive zone set.

@Consolatis
Copy link
Member

hm.. you are right. We do not update the layershell background layer for new exclusive zones.
This has to be fixed. Thanks for the report!

@Consolatis Consolatis added the bug Something isn't working label Dec 6, 2023
@Consolatis Consolatis added this to the 0.7.0 milestone Dec 6, 2023
Consolatis added a commit to Consolatis/labwc that referenced this issue Dec 6, 2023
This ensures that the usable area is completely calculated
before non exclusive-zone clients are positioned / resized.

Fixes labwc#1285
Reported-by: @spl237
@Consolatis
Copy link
Member

Consolatis commented Dec 6, 2023

Just found this in the wlroots sources:

// If the exclusive zone is set to -1, the layer surface will use the
// full area of the output, otherwise it is constrained to the
// remaining usable area.

swaybg for example sets it to -1 which results in not reacting to exclusive zone clients.

There is also an issue in labwc in that we calculate the usable area starting from bottom layer to overlay layer so that even with manually hacking wlroots to always use the usable area it would still not work for non-exclusive background layers with exclusive bottom or top layer clients.

The following PR should fix the issue:

Testing welcome.

@Consolatis Consolatis added the PR pending PR to fix the issue is already pending label Dec 6, 2023
@spl237
Copy link
Contributor Author

spl237 commented Dec 6, 2023

Tested here - fixes my problem! Many thanks for the very prompt fix.

@Consolatis
Copy link
Member

Thanks for testing. We have a no-self-merge policy (unless its a crash fix or some minor stuff) so it might take a bit to have the fix in the master branch.

@spl237
Copy link
Contributor Author

spl237 commented Dec 6, 2023

No problem at all - we're not in any hurry!

Thanks again.

@spl237
Copy link
Contributor Author

spl237 commented Dec 6, 2023

Closing as patch fixes the issue.

@spl237 spl237 closed this as completed Dec 6, 2023
johanmalm pushed a commit that referenced this issue Dec 6, 2023
This ensures that the usable area is completely calculated
before non exclusive-zone clients are positioned / resized.

Fixes #1285
Reported-by: @spl237
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working PR pending PR to fix the issue is already pending
Projects
None yet
Development

No branches or pull requests

2 participants