Make wmaker XRandR aware
commitc201e1612c1798106ccc2f806669a90b0bbb7a19
authorCarlos R. Mafra <crmafra@gmail.com>
Sun, 22 Aug 2010 17:05:07 +0000 (22 19:05 +0200)
committerCarlos R. Mafra <crmafra@gmail.com>
Sun, 22 Aug 2010 20:13:45 +0000 (22 22:13 +0200)
tree70feaad4ab3230509a149f1a465afadf37a7a60a
parentf6b7178542f02e63037f664e26c5d21cf6e8779f
Make wmaker XRandR aware

This patch makes wmaker automatically Restart() to take into account
resolution changes done by xrandr.

The motivation to write this patch is that when I start my laptop connected
to an external monitor (VGA1), the resolution in the monitor is initially
wrong (perhaps this is a bug in XOrg or OpenSuse, but anyway), so I always
do this after starting wmaker:

xrandr --output VGA1 --preferred

The resolution in the external monitor gets fixed, but wmaker does not
recognize the change automatically and I have to manually restart it.

So this patch avoids the last step by making wmaker be XRandR-aware.
Wmaker now restarts automatically when it receives a RRChangeScreenNotify
event and I don't have to do the last part of the silly procedure described
above.

I am not sure if restarting wmaker is the most elegant solution, but
it at least solves part of my issue with wmaker + xrandr.
configure.ac
src/event.c
src/main.c
src/screen.c
src/startup.c