[Newbies] Screensaver detection

Uwe Loew uwe_loew at gmx.net
Tue Feb 12 21:53:57 UTC 2008


Hello squeak professionals,

in our process monitoring software we use a background process to update the displayed values.


breakFlag := false.
delay := Delay forMilliseconds: 10.
Processor fork: [
            [ breakFlag ] whileFalse: [
                backgroundProcess := true.      "Process is now active "
                    delay wait.
                    ........................................."calling the GUI update methods displaying the measured values from the process"
                   delay wait.
            ].
            backgroundProcess := false.         "Process is going to terminate "
        ] at: Processor userPriority - 5

Processor is an instance of ProcessScheduler.


Something in our GUI update software wastes memory and over some days crashes the system. So the user has to stop the background display process when leaving the system and to restart it when coming back. We now want to automate this switching on and off of the GUI updates by checking the screensaver status of windows. Our wish is to check in each update cycle, whether the windows-screensaver is on, and depending on this status, to update the GUI display or not.
Can anybody of you give us a hint, how to check, whether windows has switched of the desktop-display and displaying the screensaver, or is still displaying the desktop containing the squeak window?

Thank you very much.

Best regards    

Uwe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/beginners/attachments/20080212/77be58dd/attachment-0001.htm


More information about the Beginners mailing list