mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 22:10:47 +00:00
[NSApplication -run]: only execute launch sequence on first call; unhide mouse on application exit
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@21162 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
c0748edc9b
commit
2da3c52280
3 changed files with 19 additions and 6 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2005-04-27 Adrian Robert <arobert@cogsci.ucsd.edu>
|
||||||
|
* Headers/AppKit/NSApplication.h: Add app_is_launched ivar.
|
||||||
|
* Source/NSApplication.m (-run): Only go through launch process
|
||||||
|
and call -finishLaunching on first call.
|
||||||
|
(-replyToApplicationShouldTerminate:) Unhide mouse on app exit.
|
||||||
|
|
||||||
2005-04-25 Adam Fedor <fedor@gnu.org>
|
2005-04-25 Adam Fedor <fedor@gnu.org>
|
||||||
|
|
||||||
* configure.ac: Check for lib portaudio
|
* configure.ac: Check for lib portaudio
|
||||||
|
|
|
@ -98,7 +98,8 @@ APPKIT_EXPORT NSString *NSEventTrackingRunLoopMode;
|
||||||
id _listener;
|
id _listener;
|
||||||
NSMenu *_main_menu;
|
NSMenu *_main_menu;
|
||||||
NSMenu *_windows_menu;
|
NSMenu *_windows_menu;
|
||||||
// 5 bits
|
// 6 bits
|
||||||
|
BOOL _app_is_launched;
|
||||||
BOOL _app_is_running;
|
BOOL _app_is_running;
|
||||||
BOOL _app_is_active;
|
BOOL _app_is_active;
|
||||||
BOOL _app_is_hidden;
|
BOOL _app_is_hidden;
|
||||||
|
|
|
@ -1147,18 +1147,23 @@ static NSSize scaledIconSizeForSize(NSSize imageSize)
|
||||||
format: @"NSApp's run called recursively"];
|
format: @"NSApp's run called recursively"];
|
||||||
}
|
}
|
||||||
|
|
||||||
IF_NO_GC(_runLoopPool = [arpClass new]);
|
|
||||||
/*
|
/*
|
||||||
* Set this flag here in case the application is actually terminated
|
* Set this flag here in case the application is actually terminated
|
||||||
* inside -finishLaunching.
|
* inside -finishLaunching.
|
||||||
*/
|
*/
|
||||||
_app_is_running = YES;
|
_app_is_running = YES;
|
||||||
|
|
||||||
[self finishLaunching];
|
if (_app_is_launched == NO)
|
||||||
|
{
|
||||||
|
_app_is_launched = YES;
|
||||||
|
IF_NO_GC(_runLoopPool = [arpClass new]);
|
||||||
|
|
||||||
[_listener updateServicesMenu];
|
[self finishLaunching];
|
||||||
[_main_menu update];
|
|
||||||
DESTROY(_runLoopPool);
|
[_listener updateServicesMenu];
|
||||||
|
[_main_menu update];
|
||||||
|
DESTROY(_runLoopPool);
|
||||||
|
}
|
||||||
|
|
||||||
while (_app_is_running)
|
while (_app_is_running)
|
||||||
{
|
{
|
||||||
|
@ -2718,6 +2723,7 @@ image.
|
||||||
_app_is_running = NO;
|
_app_is_running = NO;
|
||||||
|
|
||||||
[[self windows] makeObjectsPerformSelector: @selector(close)];
|
[[self windows] makeObjectsPerformSelector: @selector(close)];
|
||||||
|
[NSCursor setHiddenUntilMouseMoves: NO];
|
||||||
|
|
||||||
/* Store our user information. */
|
/* Store our user information. */
|
||||||
[[NSUserDefaults standardUserDefaults] synchronize];
|
[[NSUserDefaults standardUserDefaults] synchronize];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue