Mouse moves one pixel, screen re-enabled

James Cloos cloos+pdx-xorg at jhcloos.com
Tue Aug 28 02:17:19 PDT 2007


>>>>> "Jorge" == Jorge Peixoto de Morais Neto writes:

Jorge> There should be an option in Xorg.conf that made Xorg calculate
Jorge> the idle time based solely on keyboard activity and mouse button
Jorge> clicks, but not on mouse pointer movement. Ideally this would be
Jorge> controllable with xset so I could write a script that enables it
Jorge> right before locking the screen.

This is a bit more involved of a change than you may think.

First of all, you'd need to define a new version of the DPMS extension
which adds another pair of messages to set and query an input mask which
should be ignored by wakeup handlers.  That is the easy part.

It should be a mask because if you are going to do it at all you may as
well (try to) future-proof it, and setting or querying a mask takes no
more bandwidth that a single bit flag or two.

Modifying xset(1x) to know about this new version of the extension and
the mask set/query messages is also easy.  As is modifying the code
which parses xorg.conf.

Actually *using* that mask, OTOH, is a lot more work.

AFAICT from a cursory inspection, the modifications to the X server
would be confined to the various Device Dependent (DDX) sections of the
code.  (Other than the xorg.conf parsing changes, of course.)  But you'd
need to modify each of them, looking for the wakeup calls and adding
code to compare the input event to the mask and only trigger the actual
wakeup when they match.

Perhaps just a Simple Matter of Code, but certainly an Effort.

-JimC
-- 
James Cloos <cloos at jhcloos.com>         OpenPGP: 1024D/ED7DAEA6



More information about the xorg mailing list