mirror of
https://github.com/fltk/fltk.git
synced 2026-05-28 11:25:22 +08:00
Fix small problem in win->wait_for_expose() for a window that has subwindows.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11348 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
+12
-6
@@ -654,6 +654,7 @@ void Fl_Cocoa_Screen_Driver::remove_timeout(Fl_Timeout_Handler cb, void* data)
|
|||||||
- (void)recursivelySendToSubwindows:(SEL)sel;
|
- (void)recursivelySendToSubwindows:(SEL)sel;
|
||||||
- (void)setSubwindowFrame;
|
- (void)setSubwindowFrame;
|
||||||
- (void)checkSubwindowFrame;
|
- (void)checkSubwindowFrame;
|
||||||
|
- (void)waitForExpose;
|
||||||
- (NSRect)constrainFrameRect:(NSRect)frameRect toScreen:(NSScreen *)screen;
|
- (NSRect)constrainFrameRect:(NSRect)frameRect toScreen:(NSScreen *)screen;
|
||||||
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7
|
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_7
|
||||||
- (NSPoint)convertBaseToScreen:(NSPoint)aPoint;
|
- (NSPoint)convertBaseToScreen:(NSPoint)aPoint;
|
||||||
@@ -774,6 +775,16 @@ void Fl_Cocoa_Screen_Driver::remove_timeout(Fl_Timeout_Handler cb, void* data)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
-(void)waitForExpose
|
||||||
|
{
|
||||||
|
if ([self getFl_Window]->shown()) {
|
||||||
|
// this makes freshly created windows appear on the screen, if they are not there already
|
||||||
|
NSModalSession session = [NSApp beginModalSessionForWindow:self];
|
||||||
|
[NSApp runModalSession:session];
|
||||||
|
[NSApp endModalSession:session];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* With Mac OS 10.11 the green window button makes window fullscreen (covers system menu bar and dock).
|
/* With Mac OS 10.11 the green window button makes window fullscreen (covers system menu bar and dock).
|
||||||
When there are subwindows, they are by default constrained not to cover the menu bar
|
When there are subwindows, they are by default constrained not to cover the menu bar
|
||||||
(this is arguably a Mac OS bug).
|
(this is arguably a Mac OS bug).
|
||||||
@@ -3097,12 +3108,7 @@ void Fl_Window::size_range_() {
|
|||||||
|
|
||||||
void Fl_Cocoa_Window_Driver::wait_for_expose()
|
void Fl_Cocoa_Window_Driver::wait_for_expose()
|
||||||
{
|
{
|
||||||
if (pWindow->shown()) { //TODO: do that also for pWindow's subwindows
|
[fl_xid(pWindow) recursivelySendToSubwindows:@selector(waitForExpose)];
|
||||||
// this makes freshly created windows appear on the screen, if they are not there already
|
|
||||||
NSModalSession session = [NSApp beginModalSessionForWindow:Fl_X::i(pWindow)->xid];
|
|
||||||
[NSApp runModalSession:session];
|
|
||||||
[NSApp endModalSession:session];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
Reference in New Issue
Block a user