On 2010-08-22 "Carlos R. Mafra" <[email protected]> wrote:
> This patch makes wmaker automatically Restart() to take into account
> resolution changes done by xrandr.
[...]
> diff --git a/src/startup.c b/src/startup.c
> index 9b63687..b16b979 100644
> --- a/src/startup.c
> +++ b/src/startup.c
[...]
> +#ifdef HAVE_XRANDR
> +extern Bool has_randr;
> +extern int randr_event_base;
> +#endif
> +
>  /* contexts */
[...]
> @@ -692,6 +700,12 @@ void StartUp(Bool defaultScreenOnly)
>       wShapeSupported = XShapeQueryExtension(dpy, &wShapeEventBase, &j);
>  #endif

> +#ifdef HAVE_XRANDR
> +     has_randr = XRRQueryExtension(dpy, &randr_event_base, &dummy);
> +#else
> +     has_randr = false;
> +#endif
> +
[...]

Hello,
This part will cause a build failure if randr is missing. has_randr is
modified but not declared. Patch attached.

I think the Debian package should be built with RandR support by
default. - Patch attached.

cu andreas

From 2fd611e6b745cdfac9ac87598a9c056c0f840792 Mon Sep 17 00:00:00 2001
From: Andreas Metzler <[email protected]>
Date: Sun, 29 Aug 2010 13:31:58 +0200
Subject: [PATCH 1/2] Fix build failure on missing randr

When building without xrandr support do not try to modify undefined
variable has_randr.
---
 src/startup.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/src/startup.c b/src/startup.c
index b16b979..87fa6af 100644
--- a/src/startup.c
+++ b/src/startup.c
@@ -702,8 +702,6 @@ void StartUp(Bool defaultScreenOnly)
 
 #ifdef HAVE_XRANDR
 	has_randr = XRRQueryExtension(dpy, &randr_event_base, &dummy);
-#else
-	has_randr = false;
 #endif
 
 #ifdef KEEP_XKB_LOCK_STATUS
-- 
1.7.1

From 6c9bd340f2226007466fb3f0dc535b13db58a394 Mon Sep 17 00:00:00 2001
From: Andreas Metzler <[email protected]>
Date: Sun, 29 Aug 2010 13:42:33 +0200
Subject: [PATCH 2/2] Build Debian packages with RandR support

Add libxrandr-dev to build-depends.
---
 debian/changelog |    2 ++
 debian/control   |    3 ++-
 2 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index cc86788..a9579e1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -31,6 +31,8 @@ wmaker (0.92.0+git-0) unstable; urgency=low
   * Implement the switch from SelectWindowsMouseButton et al. to
     MouseLeftButtonAction = SelectWindows from WindowMaker 0.65 in Debian's
     customized defaults. Closes: #116963
+  * Add libxrandr-dev to build-depends, enabling automatic wmaker restart on
+    resolution changes.
   * Built from wmaker-crm fork.
     Includes these patches for these issues:
     + display corruption on non 24bpp displays. Closes: #514438
diff --git a/debian/control b/debian/control
index 2c95b09..1084d53 100644
--- a/debian/control
+++ b/debian/control
@@ -6,7 +6,8 @@ Standards-Version: 3.8.0.1
 Build-Depends: debhelper (>= 7.0.15), automake, gettext, dctrl-tools,
  libfontconfig1-dev, libjpeg-dev, libpng12-dev, libsm-dev, libtiff4-dev,
  libtool, libgif-dev, libx11-dev, libxext-dev, libxft-dev, libxinerama-dev,
- libxkbfile-dev, libxpm-dev, libxt-dev, libxrender-dev, sharutils, libxmu-dev
+ libxkbfile-dev, libxpm-dev, libxt-dev, libxrender-dev, sharutils, libxmu-dev,
+ libxrandr-dev
 Homepage: http://www.windowmaker.info/
 
 Package: wmaker
-- 
1.7.1

Attachment: signature.asc
Description: Digital signature

Reply via email to