Henry Vermaak wrote:
On 25/09/12 11:01, Mark Morgan Lloyd wrote:
I appreciate that there might be no guaranteed portable answer to this
one, and FWIW I'm primarily interested in the Linux+X+KDE combination.
If a program knows that something's going on that it might later need to
tell the user about, e.g. that there's serial comms going on in the
background even if the GUI's not being updated, is it possible to do
anything that the LCL and lower levels will interpret similarly to
keyboard and mouse activity in order to prevent a screen saver from
kicking in?
xdg-screensaver is a script that you can use to control the screensaver
(seems to support all the ones I know). It's in the xdg-utils package
on my system. I don't know of a nicer way to do this and cover all the
bases, except to use dbus with org.freedesktop.ScreenSaver, most desktop
environments should work with that, I think.
I try to use the xdg utilities when I can, and pursuing Graeme's
suggestion of looking at the VLC sources I see they use it which has to
be a recommendation.
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"
when data is seen coming through. The only alternative I can see is
doing something at the kernel level to push a keyboard or mouse event
through to X.
--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk
[Opinions above are the author's, not those of his employers or colleagues]
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus