nanogui: screensaver
Subject:
Re: [nanogui] Re: Screen Saver
From:
Alex Holden ####@####.####
Date:
4 Oct 2005 16:33:08 +0100
Message-Id: <D78C6A97-3308-4838-B96A-9739C8D3BCD7@linuxhacker.org>
On 4 Oct 2005, at 16:31, Jordan Crouse wrote:
> On 04/10/05 09:32 -0500, Michael Gao wrote:
>> With Nano-X, currently root window always gets the keyboard focus
>> after
>> screen saver is deactivated, thus make the modal child window
>> modeless,
>> is this a known bug or by design?
> I'm gong to go ahead and call that a bug. If you have a modal
> child, it
> should retain the focus through a screensaver event.
The screensaver needs the keyboard focus so that it can listen for a
keyboard event on which to exit, then when it exits, the server
doesn't remember which window had the focus before the screensaver
did, so it defaults to giving it to the root window. I think it
should be possible to fix this by having nsaver do a GrGetFocus() on
startup to find out the previous owner of the focus, then do a
GrSetFocus() on exit to restore it.
--
------------ Alex Holden - http://www.alexholden.net/ ------------
If it doesn't work, you're not hitting it with a big enough hammer