summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Fl_cocoa.mm2
1 files changed, 2 insertions, 0 deletions
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
{