mirror of
https://github.com/gryf/wmaker.git
synced 2026-01-08 23:04:15 +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:
16
configure.ac
16
configure.ac
@@ -480,6 +480,21 @@ if test "$shape" = yes; then
|
||||
shape=no, $XLFLAGS $XLIBS)
|
||||
fi
|
||||
|
||||
dnl XRandR support
|
||||
dnl =============
|
||||
xrandr=yes
|
||||
AC_ARG_ENABLE(XRandR,
|
||||
[ --disable-xrandr disable XRandR window extension support],
|
||||
xrandr=$enableval, xrandr=yes)
|
||||
|
||||
added_xext=no
|
||||
|
||||
if test "$xrandr" = yes; then
|
||||
AC_CHECK_LIB(Xrandr, XRRQueryExtension, [XLIBS="-lXrandr $XLIBS"
|
||||
added_xext=yes
|
||||
AC_DEFINE(HAVE_XRANDR, 1, [define if you want support for XRandR (set by configure)])],
|
||||
xrandr=no, $XLFLAGS $XLIBS)
|
||||
fi
|
||||
|
||||
dnl
|
||||
dnl libWINGS uses math functions, check whether usage requires linking
|
||||
@@ -1072,6 +1087,7 @@ echo "Use assembly routines for wrlib : $asm_support"
|
||||
echo "Use inline MMX(tm) x86 assembly : $mmx_support"
|
||||
echo "Antialiased text support in WINGs : $xft"
|
||||
echo "Xinerama extension support : $xinerama"
|
||||
echo "XRandR extension support : $xrandr"
|
||||
echo "Translated message files to install : $mof"
|
||||
dnl echo "Supported languages beside English : $languages"
|
||||
if test "x$MOFILES" != "x"; then
|
||||
|
||||
Reference in New Issue
Block a user