mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 20:38:08 +01:00
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.
This commit is contained in:
@@ -143,6 +143,11 @@ Bool wXkbSupported;
|
||||
int wXkbEventBase;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_XRANDR
|
||||
Bool has_randr;
|
||||
int randr_event_base;
|
||||
#endif
|
||||
|
||||
/* special flags */
|
||||
char WProgramSigState = 0;
|
||||
char WProgramState = WSTATE_NORMAL;
|
||||
|
||||
Reference in New Issue
Block a user