From 1ff2af5fd30272885bdcbec22809377fb2e3456f Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Thu, 11 Feb 2010 09:32:26 +0000 Subject: update event_x_root and event_x earlier is more accurate git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7062 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_cocoa.mm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm index 334720b3d..46b9fad24 100644 --- a/src/Fl_cocoa.mm +++ b/src/Fl_cocoa.mm @@ -53,7 +53,9 @@ extern "C" { #include #include #include -#if __GNUC__ == 3 // because Fl_Image.H uses a private variable name id that's illegal under GCC 3 +#if __GNUC__ == 3 +// because Fl_Image.H, included by Fl_Sys_Menu_Bar.H, uses a private variable name id +// that's illegal under GCC 3 -x -objective-c++ #define id id_ #endif #include @@ -1310,11 +1312,11 @@ extern "C" { pt.x = 0; pt.y = [[nsw contentView] frame].size.height; pt2 = [nsw convertBaseToScreen:pt]; + update_e_xy_and_e_xy_root(nsw); window->position((int)pt2.x, (int)([[nsw screen] frame].size.height - pt2.y)); if ([nsw containsGLsubwindow] ) { [nsw display];// redraw window after moving if it contains OpenGL subwindows } - update_e_xy_and_e_xy_root(nsw); } - (void)windowDidResize:(NSNotification *)notif { @@ -1326,11 +1328,11 @@ extern "C" { pt.y = [[nsw contentView] frame].size.height; pt2 = [nsw convertBaseToScreen:pt]; resize_from_system = window; + update_e_xy_and_e_xy_root(nsw); window->resize((int)pt2.x, (int)([[nsw screen] frame].size.height - pt2.y), (int)r.size.width, (int)r.size.height); - update_e_xy_and_e_xy_root(nsw); } - (void)windowDidBecomeKey:(NSNotification *)notif { -- cgit v1.2.3