From dfd208e171590c0fae3558c84252550ed9caa6a1 Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Mon, 15 Sep 2025 09:05:16 +0200 Subject: Complete Wayland-related part of issue #1295 --- src/Fl_x.cxx | 6 +++--- src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx | 2 -- src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx | 2 -- src/drivers/X11/Fl_X11_Window_Driver.cxx | 2 -- 4 files changed, 3 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/Fl_x.cxx b/src/Fl_x.cxx index fed46a638..7a979ec42 100644 --- a/src/Fl_x.cxx +++ b/src/Fl_x.cxx @@ -103,8 +103,8 @@ extern int fl_send_system_handlers(void *e); #if FLTK_CONSOLIDATE_MOTION static Fl_Window* send_motion; -extern Fl_Window* fl_xmousewin; #endif +extern Fl_Window* fl_xmousewin; static bool in_a_window; // true if in any of our windows, even destroyed ones static void do_queued_events() { @@ -2199,9 +2199,9 @@ int fl_handle(const XEvent& thisevent) if (xevent.xcrossing.detail == NotifyInferior) break; set_event_xy(window); Fl::e_state = xevent.xcrossing.state << 16; -#if FLTK_CONSOLIDATE_MOTION +//#if FLTK_CONSOLIDATE_MOTION // this needs to be commented out in 1.4 and above (see #1295) fl_xmousewin = 0; -#endif // FLTK_CONSOLIDATE_MOTION +//#endif // FLTK_CONSOLIDATE_MOTION in_a_window = false; // make do_queued_events produce FL_LEAVE event return 0; diff --git a/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx b/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx index 8bae05c42..86bfdb98d 100644 --- a/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx +++ b/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx @@ -245,8 +245,6 @@ static void pointer_leave(void *data, struct wl_pointer *wl_pointer, need_leave = win->top_window(); // we leave a sub or toplevel window wl_display_roundtrip(fl_wl_display()); // pointer_enter to other win, if applicable, will run if (need_leave) { // we really left the sub-or-top win and did not enter another - extern Fl_Window *fl_xmousewin; - fl_xmousewin = 0; Fl::handle(FL_LEAVE, need_leave); } } diff --git a/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx b/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx index dd7761df9..eb8d3647a 100644 --- a/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx +++ b/src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx @@ -453,8 +453,6 @@ void Fl_Wayland_Window_Driver::hide() { Fl_Screen_Driver::del_transient_window(NULL); } Fl_X* ip = Fl_X::flx(pWindow); - extern Fl_Window *fl_xmousewin; - fl_xmousewin = 0; if (hide_common()) return; if (ip->region) { Fl_Graphics_Driver::default_driver().XDestroyRegion(ip->region); diff --git a/src/drivers/X11/Fl_X11_Window_Driver.cxx b/src/drivers/X11/Fl_X11_Window_Driver.cxx index 354c5a855..96f43ce26 100644 --- a/src/drivers/X11/Fl_X11_Window_Driver.cxx +++ b/src/drivers/X11/Fl_X11_Window_Driver.cxx @@ -434,8 +434,6 @@ void Fl_X11_Window_Driver::make_current() { void Fl_X11_Window_Driver::hide() { Fl_X* ip = Fl_X::flx(pWindow); - extern Fl_Window *fl_xmousewin; - fl_xmousewin = 0; if (hide_common()) return; if (ip->region) Fl_Graphics_Driver::default_driver().XDestroyRegion(ip->region); # if USE_XFT && ! FLTK_USE_CAIRO -- cgit v1.2.3