From 0585de060ccb3f5a4f9d089bbd2386da813d8c5b Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Wed, 4 Sep 2013 09:30:18 +0000 Subject: Added fl_lock/unlock_function() calls for extra caution in - (void)applicationDidChangeScreenParameters: git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9959 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_cocoa.mm | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm index e55f4859d..6f6dc848f 100644 --- a/src/Fl_cocoa.mm +++ b/src/Fl_cocoa.mm @@ -1147,6 +1147,7 @@ static void cocoaMouseHandler(NSEvent *theEvent) } - (void)applicationDidChangeScreenParameters:(NSNotification *)unused { // react to changes in screen numbers and positions + fl_lock_function(); main_screen_height = [[[NSScreen screens] objectAtIndex:0] frame].size.height; Fl::call_screen_init(); // FLTK windows have already been notified they were moved, @@ -1160,6 +1161,7 @@ static void cocoaMouseHandler(NSEvent *theEvent) } } Fl::handle(FL_SCREEN_CONFIGURATION_CHANGED, NULL); + fl_unlock_function(); } - (void)applicationWillResignActive:(NSNotification *)notify { -- cgit v1.2.3