discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GNUstep and session management


From: Richard Frith-Macdonald
Subject: Re: GNUstep and session management
Date: Thu, 06 Oct 2005 13:44:48 +0000

On 2005-10-06 13:17:26 +0000 Roman Belenov <rbelenov@yandex.ru> wrote:

Richard Frith-Macdonald <richard@brainstorm.co.uk> writes:

I have never seen anything in the MacOS-X documentation describing how the
session manager tells the application to shut down other than the
NSWorkspaceWillPowerOffNotification.  It is clear that the session manager
sends thay notification to each application to tell it to shut down, but it
is not clear what happens then.
Does NSApp observe the notification and call its own -terminate method when
it receives it, or does it depend on the applicaton programmer to write code
to observe the notification and call -terminate?

Aforementioned documentation explicitly mentions logout, restart and shutdown
as possible cases of application termination, so the following text (stating
that NSDocumentController handles graceful termination itself and listing the
code for manual handling) should be applicable to these situations. So it
seems that applicationShouldTerminate: is called without any help from
programmer, either by framework (by observing
NSWorkspaceWillPowerOffNotification) or by session manager (by iterating over
the list of running applications after sending
NSWorkspaceWillPowerOffNotification).

My point was that there is nowhere that tells us *which* of the possibilities is used by MacOS-X.

None of them is used by GNUstep (though app programmers could observe NSWorkspaceWillPowerOffNotification).

It would be nice to get GNUstep to use the same mechanism as MacOS-X ... but at the moment we don't know what that is.

I think we can safely infer that the session manager *should* send the NSWorkspaceWillPowerOffNotification to all apps on session termination, but we don't know what (if anything) it should do then (other than some sort of force quit of applications still running after some interval), and we don't know if the gui library should observe NSWorkspaceWillPowerOffNotification and call [NSApp terminate]









reply via email to

[Prev in Thread] Current Thread [Next in Thread]