From 2cda5a4fa682372f294a7a8e9e2b90a9fdb15610 Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Sat, 17 Jun 2017 06:53:44 +0000 Subject: Make Fl_Screen_Driver::get_mouse(int&, int&) return the number of the mouse-containing screen. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12264 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_cocoa.mm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/Fl_cocoa.mm') diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm index 41b3e9e41..743f0c5a1 100644 --- a/src/Fl_cocoa.mm +++ b/src/Fl_cocoa.mm @@ -1896,12 +1896,13 @@ void Fl_Cocoa_Screen_Driver::screen_work_area(int &X, int &Y, int &W, int &H, in /* * get the current mouse pointer world coordinates */ -void Fl_Cocoa_Screen_Driver::get_mouse(int &x, int &y) +int Fl_Cocoa_Screen_Driver::get_mouse(int &x, int &y) { open_display(); NSPoint pt = [NSEvent mouseLocation]; x = int(pt.x); y = int(main_screen_height - pt.y); + return screen_num(x, y); } -- cgit v1.2.3