From e3e8fe494d71a0ab1869fd4fcd275366373b464d Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Thu, 1 Jul 2021 17:44:54 +0200 Subject: Fix FL_MOUSEWHEEL event coordinates in subwindow (#210) Issue #210: "Fl::event_x() & event_y() doesn't take into account embedded window's coords with Mouse wheel events" In fact the calculation of Fl::event_x() and Fl::event_y() used the wrong window coordinates if the event was sent to a subwindow. --- src/Fl.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/Fl.cxx b/src/Fl.cxx index da4fa4716..cf591cd77 100644 --- a/src/Fl.cxx +++ b/src/Fl.cxx @@ -1341,7 +1341,7 @@ int Fl::handle_(int e, Fl_Window* window) return 1; } // Finally try sending it to the window, the event occurred in - if (send_event(FL_MOUSEWHEEL, window, window)) return 1; + if (send_event(FL_MOUSEWHEEL, window, window->top_window())) return 1; default: break; } -- cgit v1.2.3