mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-29 20:17:38 +00:00
Added support for WindowMaker's WMFHideApplication action.
This commit is contained in:
parent
7fa72c547e
commit
f018c2087b
6 changed files with 54 additions and 23 deletions
|
@ -601,6 +601,12 @@ GSCurrentServer(void)
|
|||
[self subclassResponsibility: _cmd];
|
||||
}
|
||||
|
||||
/** Hides all application windows */
|
||||
- (void) hidewindow: (int) win
|
||||
{
|
||||
[self subclassResponsibility: _cmd];
|
||||
}
|
||||
|
||||
/** Returns YES if the application should create the miniwindow counterpart
|
||||
to the full size window and own it. Some display systems handle the
|
||||
miniwindow themselves. In this case the backend subclass should
|
||||
|
|
|
@ -2496,30 +2496,37 @@ image.</p><p>See Also: -applicationIconImage</p>
|
|||
[_hidden_main resignMainWindow];
|
||||
}
|
||||
|
||||
windows_list = GSOrderedWindows();
|
||||
iter = [windows_list reverseObjectEnumerator];
|
||||
// Sends -hidewindow: to the main menu. If window manager supports
|
||||
// _GNUSTEP_WM_HIDE_APP atom - call succeeds - our windows will be
|
||||
// hidden by window manager, next application should be activated.
|
||||
win = [[self mainMenu] window];
|
||||
if ([GSServerForWindow(win) hidewindow: [win windowNumber]] == NO)
|
||||
{
|
||||
windows_list = GSOrderedWindows();
|
||||
iter = [windows_list reverseObjectEnumerator];
|
||||
|
||||
while ((win = [iter nextObject]))
|
||||
{
|
||||
if ([win isVisible] == NO && ![win isMiniaturized])
|
||||
{
|
||||
continue; /* Already invisible */
|
||||
}
|
||||
if ([win canHide] == NO)
|
||||
{
|
||||
continue; /* Not hideable */
|
||||
}
|
||||
if (win == _app_icon_window)
|
||||
{
|
||||
continue; /* can't hide the app icon. */
|
||||
}
|
||||
if (_app_is_active == YES && [win hidesOnDeactivate] == YES)
|
||||
{
|
||||
continue; /* Will be hidden by deactivation */
|
||||
}
|
||||
[_hidden addObject: win];
|
||||
[win orderOut: self];
|
||||
}
|
||||
while ((win = [iter nextObject]))
|
||||
{
|
||||
if ([win isVisible] == NO && ![win isMiniaturized])
|
||||
{
|
||||
continue; /* Already invisible */
|
||||
}
|
||||
if ([win canHide] == NO)
|
||||
{
|
||||
continue; /* Not hideable */
|
||||
}
|
||||
if (win == _app_icon_window)
|
||||
{
|
||||
continue; /* can't hide the app icon. */
|
||||
}
|
||||
if (_app_is_active == YES && [win hidesOnDeactivate] == YES)
|
||||
{
|
||||
continue; /* Will be hidden by deactivation */
|
||||
}
|
||||
[_hidden addObject: win];
|
||||
[win orderOut: self];
|
||||
}
|
||||
}
|
||||
_app_is_hidden = YES;
|
||||
|
||||
if (YES == [[NSUserDefaults standardUserDefaults]
|
||||
|
|
|
@ -4224,6 +4224,10 @@ checkCursorRectanglesExited(NSView *theView, NSEvent *theEvent, NSPoint lastPoi
|
|||
[self performMiniaturize: NSApp];
|
||||
break;
|
||||
|
||||
case GSAppKitAppHide:
|
||||
[NSApp hide: self];
|
||||
break;
|
||||
|
||||
case GSAppKitWindowFocusIn:
|
||||
if (_f.is_miniaturized)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue