Skip to content

Commit

Permalink
wayland: ensure bemenu is shown on top of fullscreen windows
Browse files Browse the repository at this point in the history
Before this patch, wayland compositors that render fullscreen
windows between the top and overlay layers would show bemenu
behind an active fullscreen window. For other compositors
the z-rendering order was undefined.

This change ensures that bemenu will always be on top of other
usual windows (including fullscreen ones).

Fixes #81
  • Loading branch information
Consolatis authored and Cloudef committed Dec 16, 2023
1 parent f82eda7 commit d671226
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/renderers/wayland/window.c
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,8 @@ bm_wl_window_create(struct window *window, struct wl_display *display, struct wl
{
assert(window);

if (layer_shell && (window->layer_surface = zwlr_layer_shell_v1_get_layer_surface(layer_shell, surface, output, ZWLR_LAYER_SHELL_V1_LAYER_TOP, "menu"))) {
enum zwlr_layer_shell_v1_layer layer = ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY;
if (layer_shell && (window->layer_surface = zwlr_layer_shell_v1_get_layer_surface(layer_shell, surface, output, layer, "menu"))) {
zwlr_layer_surface_v1_add_listener(window->layer_surface, &layer_surface_listener, window);
window->align_anchor = get_align_anchor(window->align);
zwlr_layer_surface_v1_set_anchor(window->layer_surface, window->align_anchor);
Expand Down

0 comments on commit d671226

Please sign in to comment.