summaryrefslogtreecommitdiff
path: root/src/drivers
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2023-12-18 07:49:02 +0100
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2023-12-18 07:49:02 +0100
commit46b2f50750a4d02349070b410a5ff9e8a862b54e (patch)
treec690ec3d17989b09c9794141b5d0036a4ddfecc1 /src/drivers
parent855a50a5f65892cd7ab9f88cd9c9a103366859d3 (diff)
Wayland: Menu items are accessible when mouse is over another win (#869)
Diffstat (limited to 'src/drivers')
-rw-r--r--src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx b/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx
index b1590e2de..eb6b6c396 100644
--- a/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx
+++ b/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx
@@ -245,11 +245,17 @@ static void pointer_motion(void *data, struct wl_pointer *wl_pointer,
(struct Fl_Wayland_Screen_Driver::seat*)data;
Fl_Window *win = event_coords_from_surface(seat->pointer_focus, surface_x, surface_y);
if (!win) return;
- // If there's an active grab() and the pointer is in a window other than the grab(),
- // make e_x_root too large to be in any window
if (Fl::grab() && !Fl::grab()->menu_window() && Fl::grab() != win) {
+ // If there's an active, non-menu grab() and the pointer is in a window other than
+ // the grab(), make e_x_root too large to be in any window
Fl::e_x_root = 1000000;
}
+ else if (Fl_Window_Driver::menu_parent(NULL) && // any kind of menu is active now, and
+ !win->menu_window() && // we enter a non-menu window
+ win != Fl_Window_Driver::menu_parent(NULL) // that's not the window below the menu
+ ) {
+ Fl::e_x_root = 1000000; // make it too large to be in any window
+ }
//fprintf(stderr, "FL_MOVE on win=%p to x:%dx%d root:%dx%d\n", win, Fl::e_x, Fl::e_y, Fl::e_x_root, Fl::e_y_root);
wld_event_time = time;
set_event_xy(win);