commit dfd208e171590c0fae3558c84252550ed9caa6a1
Author: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
AuthorDate: Mon Sep 15 09:05:16 2025 +0200
Commit: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
CommitDate: Mon Sep 15 09:05:16 2025 +0200
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(-)
diff --git src/Fl_x.cxx src/Fl_x.cxx
index fed46a6..7a979ec 100644
--- src/Fl_x.cxx
+++ 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 src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx
index 8bae05c..86bfdb9 100644
--- src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx
+++ 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 src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx
index dd7761d..eb8d364 100644
--- src/drivers/Wayland/Fl_Wayland_Window_Driver.cxx
+++ 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 src/drivers/X11/Fl_X11_Window_Driver.cxx src/drivers/X11/Fl_X11_Window_Driver.cxx
index 354c5a8..96f43ce 100644
--- src/drivers/X11/Fl_X11_Window_Driver.cxx
+++ 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
[ Direct Link to Message ]