View Single Post
marxian's Avatar
Posts: 2,448 | Thanked: 9,523 times | Joined on Aug 2010 @ Wigan, UK
#34
Originally Posted by Copernicus View Post
Yes, it does (so far as I know); I haven't put in any code to determine the state of the screen. I guess I hadn't really planned on leaving it up and running all the time, but that would make sense if you leave it as a widget, wouldn't it...

Hmm. Would it be better to shut Fettuccine off completely when the screen is dark, or perhaps give it a very slow refresh rate instead? It might be nice to have a relatively up-to-date image ready when you bring the screen back up... Although forcing the user to wait for a refresh shouldn't be too much of a hassle.
You can connect to a DBus signal from MCE that is emitted when the screen is (un)locked. That way, you can suspend updates when the screen is locked and update the image immediately when the screen is unlocked.

I use a small Screen class is some of my applications to handle this:

https://github.com/marxoft/cuteradio...aemo5/screen.h
https://github.com/marxoft/cuteradio...mo5/screen.cpp

QMaemo5HomescreenAdaptor also has a homescreenChanged(bool) signal, though I don't know if this is emitted when the screen is (un)locked.
__________________
'Men of high position are allowed, by a special act of grace, to accomodate their reasoning to the answer they need. Logic is only required in those of lesser rank.' - J K Galbraith

My website

GitHub
 

The Following 6 Users Say Thank You to marxian For This Useful Post: