mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-25 13:00:53 +00:00
* Source/NSWindow.m (makeKeyAndOrderFront:): unhide/activate
application after ordering and making it key. This prevents focus flickering between current key window and this window on application activation. Do not try to set key and main if window can't be set as key.
This commit is contained in:
parent
85c44ee8d8
commit
ae555005e5
1 changed files with 15 additions and 12 deletions
|
@ -1667,19 +1667,22 @@ titleWithRepresentedFilename(NSString *representedFilename)
|
||||||
- (void) makeKeyAndOrderFront: (id)sender
|
- (void) makeKeyAndOrderFront: (id)sender
|
||||||
{
|
{
|
||||||
[self deminiaturize: self];
|
[self deminiaturize: self];
|
||||||
/*
|
|
||||||
* If a window is ordered in, make sure that the application isn't hidden,
|
|
||||||
* and is active.
|
|
||||||
*/
|
|
||||||
if ([self canBecomeKeyWindow])
|
|
||||||
[NSApp unhide: self];
|
|
||||||
[self orderFrontRegardless];
|
[self orderFrontRegardless];
|
||||||
[self makeKeyWindow];
|
|
||||||
/*
|
if ([self canBecomeKeyWindow] != NO)
|
||||||
* OPENSTEP makes a window the main window when it makes it the key window.
|
{
|
||||||
* So we do the same (though the documentation doesn't mention it).
|
[self makeKeyWindow];
|
||||||
*/
|
/*
|
||||||
[self makeMainWindow];
|
* OPENSTEP makes a window the main window when it makes it the key window.
|
||||||
|
* So we do the same (though the documentation doesn't mention it).
|
||||||
|
*/
|
||||||
|
[self makeMainWindow];
|
||||||
|
/*
|
||||||
|
* If a window is ordered in, make sure that the application isn't hidden,
|
||||||
|
* and is active.
|
||||||
|
*/
|
||||||
|
[NSApp unhide: self];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) makeKeyWindow
|
- (void) makeKeyWindow
|
||||||
|
|
Loading…
Reference in a new issue