[maemo-developers] [maemo-developers] How to determine if the screen has turned off?

From: Daniel Stone daniel.stone at nokia.com
Date: Thu Dec 14 11:25:25 EET 2006
On Thu, Dec 14, 2006 at 11:16:02AM +0200, ext Eero Tamminen wrote:
> I think the app loses focus when the screen is blanked.
> So, the SDL app could catch screen focus events and do
> some additional checks when that happens.

Right: as far as I can tell, a big black window covers the entire
screen.  This will trigger the usual
FocusOut/VisibilityNotify=VisibilityFullyObscured chain of events.

This should be used anyway, since drawing to the screen when someone's
switched to the browser or whatever and away from your app, isn't wildly

> Can the device
> state be checked e.g. from some file on the filesystem
> (it would be better if SDL apps wouldn't need to use/link
> D-BUS)?

There is indeed a file in sysfs somewhere.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.maemo.org/pipermail/maemo-developers/attachments/20061214/9efb9db8/attachment.pgp 
More information about the maemo-developers mailing list