Re: Dialog drawing and the screensaver
Re: Dialog drawing and the screensaver
- Subject: Re: Dialog drawing and the screensaver
- From: John Cebasek <email@hidden>
- Date: Fri, 25 Feb 2005 11:56:34 -0500
Hi:
So I did some googling and found a note on Apple's website stating that
you can set the level of a window to NSScreenSaverWindowLevel +1 if you
want to display a dialog when the screensaver is running. I tried
that, and that didn't work. I wonder if the screen saver is gone at
that point and the black screen is not really a window?
Could it be that my window type is wrong. Also googling, I found a
blurb where the window was set to the correct level because it had a
styleMask of borderless? My window is a plain old NSWindow that has no
controls (close, resize or minimize) and has a popup menu, an edit
field and some buttons in it. I set the first responder to the edit
field when I wake up.
Any comments?
John
On 24-Feb-05, at 4:20 PM, Dominic Feira wrote:
Look up: NSScreenSaverWindowLevel
I think you need to promote your dialog to the same level as the
screen saver and then order it front.
[window setLevel: NSScreenSaverWindowLevel];
[window orderFront: nil];
As far as I can tell from the documentation orderWindow: relatvieTo:
is for ordering a window relative to another window, not a windowing
level.
Dominic Feira / Code Monkey / Ambrosia Software, Inc.
On Feb 24, 2005, at 3:03 PM, email@hidden wrote:
From: John Cebasek <email@hidden>
Hi All:
I've got a dialog that is to be displayed after the screensaver is
dismissed (and the screen is still black).
My dialog is there as my logging records all events that are sent to
the dialog.
I thought that showing the window above the screensaver layer would be
enough (ala:
- (void)showLoginWindowAboveSS
{
trace.stream() << "Trying to make window above NSScreenSaver" <<
endl;
[window_ orderWindow:NSWindowBelow
relativeTo:NSScreenSaverWindowLevel];
// [window_ orderFrontRegardless];
trace.stream() << "*** Window is at: " << window_ << endl;
}
And as you can see, I tried orderFrontRegardless.
And the dialog is 'managed' by:
NSModalSession modalSession = [NSApp
beginModalSessionForWindow:lWindow];
int modalResult;
do
{
modalResult = [NSApp runModalSession:modalSession];
if (modalResult == NSOKButton)
{
[NSApp abortModal];
[NSApp endModalSession:modalSession];
}
} while (modalResult == NSRunContinuesResponse);
Anyway, I must be missing a small peice of information. How do I get
my dialog 'punched through' the screensaver?
Thanks in advance for your time
John Cebasek
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden