mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-06-02 19:21:00 +00:00
Minor fixes for workspace notifications
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@5039 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
fd2a19a031
commit
d24294cb85
3 changed files with 21 additions and 2 deletions
|
@ -1493,12 +1493,24 @@ NSAssert([event retainCount] > 0, NSInternalInconsistencyException);
|
|||
|
||||
if (shouldTerminate)
|
||||
{
|
||||
NSDictionary *userInfo;
|
||||
|
||||
app_should_quit = YES;
|
||||
/*
|
||||
* add dummy event to queue to assure loop cycles
|
||||
* at least one more time
|
||||
*/
|
||||
DPSPostEvent(GSCurrentContext(), null_event, NO);
|
||||
|
||||
/*
|
||||
* Tell the Workspace that we really did terminate
|
||||
*/
|
||||
userInfo = [NSDictionary dictionaryWithObject:
|
||||
[[NSProcessInfo processInfo] processName] forKey: @"NSApplicationName"];
|
||||
[[[NSWorkspace sharedWorkspace] notificationCenter]
|
||||
postNotificationName: NSWorkspaceDidTerminateApplicationNotification
|
||||
object: self
|
||||
userInfo: userInfo];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -83,7 +83,9 @@ static NSString *GSWorkspaceNotification = @"GSWorkspaceNotification";
|
|||
}
|
||||
|
||||
/*
|
||||
* Post notification both locally and remotely.
|
||||
* Post notification remotely - since we are listening for distributed
|
||||
* notifications, we will observe the notification arriving from the
|
||||
* distributed notification center, and it will get sent out locally too.
|
||||
*/
|
||||
- (void) postNotification: (NSNotification*)aNotification
|
||||
{
|
||||
|
@ -93,7 +95,6 @@ static NSString *GSWorkspaceNotification = @"GSWorkspaceNotification";
|
|||
object: GSWorkspaceNotification
|
||||
userInfo: [aNotification userInfo]];
|
||||
[remote postNotification: rem];
|
||||
[super postNotification: aNotification];
|
||||
}
|
||||
|
||||
- (void) postNotificationName: (NSString*)name
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue