From a2567d4db78be54d06a215875fe8b74e42dd819a Mon Sep 17 00:00:00 2001 From: rfm Date: Mon, 6 Feb 2006 16:58:27 +0000 Subject: [PATCH] Pass more info in hide/unhide notifications git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@22443 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 1 + Source/NSApplication.m | 24 +++++++++++++++--------- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 56bee6d7b..3969161f8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -11,6 +11,7 @@ * Source/NSMenuView.m: ([-sizeToFit]) Fix bug #15631 ([-locationForSubmenu:]) for horizontal root menus, make successive submenus be positioned with top left corner next to item in parent. + * Source/NSApplication.m: Pass info in hide/unhide notifications. 2006-02-04 Richard Frith-Macdonald diff --git a/Source/NSApplication.m b/Source/NSApplication.m index f99603c62..88580642a 100644 --- a/Source/NSApplication.m +++ b/Source/NSApplication.m @@ -2212,9 +2212,10 @@ image.

See Also: -applicationIconImage

{ if (_app_is_hidden == NO) { - NSArray *windows_list = [self windows]; - unsigned count = [windows_list count]; - unsigned i; + NSArray *windows_list = [self windows]; + unsigned count = [windows_list count]; + NSDictionary *info; + unsigned i; [nc postNotificationName: NSApplicationWillHideNotification object: self]; @@ -2257,12 +2258,14 @@ image.

See Also: -applicationIconImage

[self deactivate]; _unhide_on_activation = YES; + info = [self _notificationUserInfo]; [nc postNotificationName: NSApplicationDidHideNotification - object: self]; + object: self + userInfo: info]; [[[NSWorkspace sharedWorkspace] notificationCenter] postNotificationName: NSApplicationDidHideNotification object: [NSWorkspace sharedWorkspace] - userInfo: [self _notificationUserInfo]]; + userInfo: info]; } } @@ -2300,8 +2303,9 @@ image.

See Also: -applicationIconImage

{ if (_app_is_hidden == YES) { - unsigned count; - unsigned i; + NSDictionary *info; + unsigned count; + unsigned i; [nc postNotificationName: NSApplicationWillUnhideNotification object: self]; @@ -2325,12 +2329,14 @@ image.

See Also: -applicationIconImage

} [[_app_icon_window contentView] setNeedsDisplay: YES]; + info = [self _notificationUserInfo]; [nc postNotificationName: NSApplicationDidUnhideNotification - object: self]; + object: self + userInfo: info]; [[[NSWorkspace sharedWorkspace] notificationCenter] postNotificationName: NSApplicationDidUnhideNotification object: [NSWorkspace sharedWorkspace] - userInfo: [self _notificationUserInfo]]; + userInfo: info]; } }