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

Menus seem to be displayed on the same layer as the parent #1293

Closed
spl237 opened this issue Dec 7, 2023 · 5 comments
Closed

Menus seem to be displayed on the same layer as the parent #1293

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

Comments

@spl237
Copy link
Contributor

spl237 commented Dec 7, 2023

A small glitch I noticed yesterday.

We use pcmanfm to draw the desktop background; if you right-click the desktop, you get a pop-up menu.
On labwc, this menu displays underneath any windows which happen to be open - on wayfire, it displays on top of any open windows.

I suspect the layer-shell layer for the menu is being set to the same layer as the parent window which opens it - as the pcman desktop window is shown on the background layer, the menu gets set to the same layer, rather than the overlay layer where it should be displayed. Would it be better to make sure all menus get assigned to the overlay layer irrespective of parent layer?

@Consolatis
Copy link
Member

The menu doesn't use the layershell protocol but is rather a usual xdg popup.

We do move popups created by layershell clients to the top layer, however we apparently only do that when created by "bottom" layershell surfaces:

labwc/src/layers.c

Lines 365 to 368 in b34d074

if (surface->layer_surface->current.layer
== ZWLR_LAYER_SHELL_V1_LAYER_BOTTOM) {
move_popup_to_top_layer(toplevel, popup);
}

So it should be easy to fix, will do it later if you don't beat me to it (== -> <=).

@Consolatis Consolatis added the bug Something isn't working label Dec 7, 2023
@spl237
Copy link
Contributor Author

spl237 commented Dec 7, 2023

I'll leave you to it - you'll know where to look! Many thanks!

@spl237
Copy link
Contributor Author

spl237 commented Dec 7, 2023

Just checked on a quick hack here - just modifying that test to check for either LAYER_BOTTOM or LAYER_BACKGROUND does indeed fix the problem.

Consolatis added a commit to Consolatis/labwc that referenced this issue Dec 7, 2023
Previously we would only do that for the bottom layer.

Fixes labwc#1293

Reported-by: @spl237
@Consolatis Consolatis added the PR pending PR to fix the issue is already pending label Dec 7, 2023
@Consolatis
Copy link
Member

Should be fixed in latest master. Thanks for the report.

@spl237
Copy link
Contributor Author

spl237 commented Dec 7, 2023

Yes, just tested here - fixed for me - many thanks!

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