nanogui: Screensaver?


Previous by date: 16 Oct 2000 14:09:52 -0000 cyace hanging.., Alexandre Berman
Next by date: 16 Oct 2000 14:09:52 -0000 How to Start Nano-X with Window Manager(nanowm), 謝秀良-圖相資訊社
Previous in thread: 16 Oct 2000 14:09:52 -0000 Screensaver?, Nils Faerber
Next in thread: 16 Oct 2000 14:09:52 -0000 Re: Screensaver?, Nils Faerber

Subject: Re: Screensaver?
From: Jordan Crouse ####@####.####
Date: 16 Oct 2000 14:09:52 -0000
Message-Id: <39EB0C9E.52C1E6F0@censoft.com>

Generally, its not a good idea to put something so client oriented in
the server.  The main select statement is there to deliver events,
be it for solitaire or a screen saver.  Plus, you don't want to get to
the point where you are making server calls for application specific
concepts.  While it is technologically possible, sometimes its better
not to open up the flood gates, because as soon as you do something like
that, no matter how innocent you want it to be, you give license to
every other programmer to put *their* application specific calls in. 

 A better scheme would be a tiny daemon running in the background
monitoring the time and watching for mouse/keyboard activity.  Because
Nano-X will allow you to monitor events on *all* windows, this would be
trivial.  After a certain amount of time, you could blank the screen or
copy it off somewhere else so you can draw stuff (but not a good idea if
your goal is battery conservation).  Then, you could keep watch for
input, and do the reverse.  This gives you many advantages:  More
configurable, more system aware (otherwise, if you want password or
other protection, you would have to put platform specific info into the
server, which we do not want).  On more capable machines, you can even
go so far as to have the screen saver modules like X11 does.  

Basically, thanks to the design of Nano-X (which some Win32 developers
might grumble about), a client is allowed the opportunity to snoop on
everybody, thereby giving a way to design a screen saver without having
to touch the server.

Happy hacking!
Jordan

Nils Faerber wrote:
> 
> Hello!
> Just installed microwindows and one of my first nano-X/FLTK apps on the iPaq
> and wondered if we should implement a screensaver into nano-X. Currently
> when I start nano-X the screen will remain on all the time which is not very
> good for the battery ;)
> So I hacked up a small screensaver routine into nanox/srvmain.c (the main
> select() loop waiting for events). This way I can monitor any input that should
> switch the screen back on. But currently the timeout is fixed at 60 seconds. To
> make this configurable I would have to implement some nano-X function that an
> application can call to modify this value. I can do this but wanted to ask
> beforehand if this is the way to go, noone has done this already or any other
> comments so that I can save otherwise useless work ;)
> Thanks!
> CU
>    nils faerber
> 
> --
> kernel concepts
> Engel & Faerber GbR      Tel: +49-271-771091-12
> Dreisbachstr. 24         Fax: +49-271-771091-19
> D-57250 Netphen          D1 : +49-170-2729106
> --
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ####@####.####
> For additional commands, e-mail: ####@####.####

Previous by date: 16 Oct 2000 14:09:52 -0000 cyace hanging.., Alexandre Berman
Next by date: 16 Oct 2000 14:09:52 -0000 How to Start Nano-X with Window Manager(nanowm), 謝秀良-圖相資訊社
Previous in thread: 16 Oct 2000 14:09:52 -0000 Screensaver?, Nils Faerber
Next in thread: 16 Oct 2000 14:09:52 -0000 Re: Screensaver?, Nils Faerber


Powered by ezmlm-browse 0.20.