diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2024-09-10 07:50:40 +0200 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2024-09-10 07:50:40 +0200 |
| commit | 9b777cc01170a41ed33bb5f98223b8d7bbf5f2b8 (patch) | |
| tree | dccc9ea27924de5272da0ea949bb8f8ef3e9c2e2 /src | |
| parent | d70c79b8bcde3f96e618a947d21581a3378349e2 (diff) | |
Wayland + Mutter: fix issue with menubar on fullscreen window (#1061)
Diffstat (limited to 'src')
| -rw-r--r-- | src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx b/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx index c25758f45..c06bdbee5 100644 --- a/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx +++ b/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx @@ -1351,8 +1351,13 @@ bool Fl_Wayland_Window_Driver::process_menu_or_tooltip(struct wld_window *new_wi xdg_positioner_set_anchor(positioner, XDG_POSITIONER_ANCHOR_BOTTOM_LEFT); xdg_positioner_set_gravity(positioner, XDG_POSITIONER_GRAVITY_BOTTOM_RIGHT); // prevent menuwindow from expanding beyond display limits - int constraint = XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_SLIDE_X | - XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_SLIDE_Y; + int constraint = XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_SLIDE_X; + if ( !(origin_win->fullscreen_active() && + Fl_Wayland_Screen_Driver::compositor == Fl_Wayland_Screen_Driver::MUTTER && + pWindow->menu_window() && !menu_offset_y(pWindow) && !is_floating_title(pWindow)) ) { + // Condition above is only to bypass Mutter bug for fullscreen windows (see #1061) + constraint |= XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_SLIDE_Y; + } if (Fl_Window_Driver::menu_bartitle(pWindow) && !Fl_Window_Driver::menu_leftorigin(pWindow)) { constraint |= XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_FLIP_Y; } |
