|
|
commit e3e8fe494d71a0ab1869fd4fcd275366373b464d
Author: Albrecht Schlosser <albrechts.fltk@online.de>
AuthorDate: Thu Jul 1 17:44:54 2021 +0200
Commit: Albrecht Schlosser <albrechts.fltk@online.de>
CommitDate: Thu Jul 1 18:42:03 2021 +0200
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(-)
diff --git src/Fl.cxx src/Fl.cxx
index da4fa47..cf591cd 100644
--- src/Fl.cxx
+++ 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;
}
[ Direct Link to Message ] | |
|
| |