summaryrefslogtreecommitdiff
path: root/src/drivers/Wayland
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2024-09-13 11:38:57 +0200
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2024-09-13 11:39:08 +0200
commit6aa5b703072c8a8fbd212d5b40f23cfd131496b2 (patch)
tree8004774c1b5a89be2d1f2d12a7392eee70e66679 /src/drivers/Wayland
parent31f4a44054f470447baec85e9c11b6a9ec3eb28a (diff)
Fix problems introduced at commits 9b777cc and d70c79b
Diffstat (limited to 'src/drivers/Wayland')
-rw-r--r--src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx29
1 files changed, 14 insertions, 15 deletions
diff --git a/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx b/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx
index c06bdbee5..bc0c264f5 100644
--- a/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx
+++ b/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx
@@ -1351,13 +1351,8 @@ 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;
- 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;
- }
+ int constraint = XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_SLIDE_X |
+ 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;
}
@@ -1891,14 +1886,18 @@ void Fl_Wayland_Window_Driver::resize(int X, int Y, int W, int H) {
xdg_surface_set_window_geometry(fl_win->xdg_surface, 0, 0, W, H);
//printf("xdg_surface_set_window_geometry: %dx%d\n",W, H);
}
- } else if (!in_handle_configure && xdg_toplevel()) {
- // Wayland doesn't seem to provide a reliable way for the app to set the
- // window position on screen. This is functional when the move is mouse-driven.
- Fl_Wayland_Screen_Driver *scr_driver = (Fl_Wayland_Screen_Driver*)Fl::screen_driver();
- if (Fl::e_state == FL_BUTTON1) {
- xdg_toplevel_move(xdg_toplevel(), scr_driver->seat->wl_seat, scr_driver->seat->serial);
- Fl::pushed(NULL);
- Fl::e_state = 0;
+ } else {
+ if (!in_handle_configure && xdg_toplevel()) {
+ // Wayland doesn't seem to provide a reliable way for the app to set the
+ // window position on screen. This is functional when the move is mouse-driven.
+ Fl_Wayland_Screen_Driver *scr_driver = (Fl_Wayland_Screen_Driver*)Fl::screen_driver();
+ if (Fl::e_state == FL_BUTTON1) {
+ xdg_toplevel_move(xdg_toplevel(), scr_driver->seat->wl_seat, scr_driver->seat->serial);
+ Fl::pushed(NULL);
+ Fl::e_state = 0;
+ }
+ } else if (pWindow->as_gl_window() && fl_win->kind == SUBWINDOW && fl_win->subsurface) {
+ wl_subsurface_set_position(fl_win->subsurface, X * f, Y * f);
}
}
}