FLTK logo

[master] d8df24a - Fix "Long Tooltips can crash under Wayland" (#1317)

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Library      Forums      Links      Apps     Login 
[  All Forums  |  Back to fltk.commit  ]
 
[ Previous Message ] [ Next Message ]

[master] d8df24a - Fix "Long Tooltips can crash under Wayland" (#1317) "ManoloFLTK" Nov 05, 2025  
 
commit d8df24a2ea221cfe65a4352e17d9a4f8a3442243
Author:     ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
AuthorDate: Wed Nov 5 21:10:18 2025 +0100
Commit:     ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
CommitDate: Wed Nov 5 21:10:18 2025 +0100

    Fix "Long Tooltips can crash under Wayland" (#1317)

 src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx
index 8bae05c..340d920 100644
--- src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx
+++ src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx
@@ -219,6 +219,7 @@ static void pointer_enter(void *data, struct wl_pointer *wl_pointer, uint32_t se
   }
   if (!win) return;
   //fprintf(stderr, "pointer_enter window=%p\n", Fl_Wayland_Window_Driver::surface_to_window(surface));
+  seat->pointer_focus = surface;
   // use custom cursor if present
   struct wl_cursor *cursor =
     fl_wl_xid(win)->custom_cursor ? fl_wl_xid(win)->custom_cursor->wl_cursor : NULL;
@@ -228,8 +229,8 @@ static void pointer_enter(void *data, struct wl_pointer *wl_pointer, uint32_t se
   set_event_xy(win);
   need_leave = NULL;
   win = Fl_Wayland_Window_Driver::surface_to_window(surface);
+  // Caution: with an Fl_Tooltip this call can hide the window being entered (#1317)
   if (!win->parent()) Fl::handle(FL_ENTER, win);
-  seat->pointer_focus = surface;
 }
 
 
[ Direct Link to Message ]
 
     
[ Previous Message ] [ Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2026 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.