mirror of
https://github.com/fltk/fltk.git
synced 2026-05-27 19:10:24 +08:00
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.
This commit is contained in:
+1
-1
@@ -1341,7 +1341,7 @@ int Fl::handle_(int e, Fl_Window* window)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
// Finally try sending it to the window, the event occurred in
|
// 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:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user