Fixed "Unlock focus on wrong view" error that occurred sometimes.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@7611 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
f0be902828
commit
347754de61
@ -2385,7 +2385,9 @@ void Fl_Window::make_current()
|
||||
win = (Fl_Window*)win->window();
|
||||
}
|
||||
|
||||
[[NSView focusView] unlockFocus];
|
||||
NSView *current_focus = [NSView focusView];
|
||||
// sometimes current_focus is set to a non-FLTK view: don't touch that
|
||||
if ( [current_focus isKindOfClass:[FLView class]] ) [current_focus unlockFocus];
|
||||
[[(NSWindow*)i->xid contentView] lockFocus];
|
||||
i->gc = (CGContextRef)[[NSGraphicsContext currentContext] graphicsPort];
|
||||
fl_gc = i->gc;
|
||||
|
Loading…
Reference in New Issue
Block a user