From 2481bfe430b85c8fdc8416dc730b502fb2f5e5f2 Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Sun, 21 Jan 2024 10:41:18 +0100 Subject: [PATCH] Fix Wayland: crash with set_menu_window() - cont'd (#892) --- src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx b/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx index 7bdf30f2b..6b2477c8c 100644 --- a/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx +++ b/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx @@ -1293,7 +1293,7 @@ bool Fl_Wayland_Window_Driver::process_menu_or_tooltip(struct wld_window *new_wi if (!target) target = Fl::belowmouse(); if (!target) target = Fl::first_window(); Fl_Window *parent_win = target->top_window(); - while (parent_win && parent_win->menu_window()) parent_win = Fl::next_window(parent_win); + while (parent_win && Fl_Window_Driver::driver(parent_win)->fltk_menu_window) parent_win = Fl::next_window(parent_win); Fl_Window *origin_win = (menu_origin ? menu_origin : parent_win); struct wld_window * parent_xid = fl_wl_xid(origin_win); struct xdg_surface *parent_xdg = parent_xid->xdg_surface;