Commits

Eugene Yunak committed 1ac8994

patch tint2 to work on x multihead properly

Comments (0)

Files changed (2)

 
 pkgname=tint2
 pkgver=0.11
-pkgrel=5
+pkgrel=6
 pkgdesc="A basic, good-looking task manager for WMs"
 arch=('i686' 'x86_64')
 url="http://code.google.com/p/tint2/"
 makedepends=('pygtk' 'cmake')
 provides=('tint')
 source=("http://$pkgname.googlecode.com/files/$pkgname-${pkgver}.tar.bz2"
-        'add-power-now-support.patch')
+        'add-power-now-support.patch'
+        'fix-multihead-issue353.patch')
 md5sums=('6fc5731e7425125fa84a2add5cef4bff'
-         '6cfcad028f1bd2f69812167f5395f890')
+         '6cfcad028f1bd2f69812167f5395f890'
+         '12a1258e4bf6694ab8ab24b3310d1962')
 
 build() {
   cd "$srcdir/$pkgname-${pkgver}"
   # add support for power_now battery attribute (fixes FS#21954)
   patch -Np0 -i ../add-power-now-support.patch
 
+  # fix issue 353, tint2 doesn't render correctly on some multihead setups
+  patch -Np0 -i ../fix-multihead-issue353.patch
+
   # python2 fix
   sed -i 's_#!/usr/bin/env python_#!/usr/bin/env python2_' src/tint2conf/tintwizard.py
   sed -i 's_python _python2 _' src/tint2conf/main.c

tint2/fix-multihead-issue353.patch

+diff -rup ../tint2-0.11.orig/src/server.c ./tint2-0.11/src/server.c
+--- ../tint2-0.11.orig/src/server.c	2012-09-10 17:45:12.564866022 +0300
++++ ./src/server.c	2012-09-10 17:45:39.461533456 +0300
+@@ -266,6 +266,10 @@ void get_monitors()
+ 				server.monitor[i].width = crtc_info->width;
+ 				server.monitor[i].height = crtc_info->height;
+ 				server.monitor[i].names = malloc((crtc_info->noutput+1) * sizeof(char*));
++				// on some recent configs, XRRGetScreenResourcesCurrent returns a fantom monitor at last position
++				if ( !(crtc_info->x|crtc_info->y|crtc_info->width|crtc_info->height) && (i==res->ncrtc-1)) {
++					res->ncrtc -= 1;
++				}
+ 				for (j=0; j<crtc_info->noutput; ++j) {
+ 					XRROutputInfo* output_info = XRRGetOutputInfo(server.dsp, res, crtc_info->outputs[j]);
+ 					printf("xRandr: Linking output %s with crtc %d\n", output_info->name, i);