[Lazarus] "Defeating" a screen saver

Mark Morgan Lloyd markMLl.lazarus at telemetry.co.uk
Tue Sep 25 19:40:59 CEST 2012


Graeme Geldenhuys wrote:
> On 2012-09-25 17:57, Mark Morgan Lloyd wrote:
>> suggestion of looking at the VLC sources I see they use it which has to
>> be a recommendation.
> 
> Interesting... I was wondering what they did. :)
> 
> 
>> I'll see what I can work in, but particularly allowing that
>> xdg-screensaver can take several seconds to run it's more suited to
>> being run at the start and end of a program session than "on the fly"
> 
> Why not simply execute the command in a background thread. Your main 
> thread then continues pulling in data or whatever it does.

I've already got a thread moving data around, and I know that when 
data's actively moving that the user isn't fiddling with keyboard or 
mouse (odds are he's got his hands on a MIDI device). I can also assume 
that he used the GUI shortly before data started arriving, so in 
practice I can use a 30 secs foreground timer (which already looks for 
and loads an updated backend .so) to fire an enable/disable command when 
the rate of flow changes.

-- 
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]




More information about the Lazarus mailing list