diff options
-rw-r--r-- | .SRCINFO | 4 | ||||
-rw-r--r-- | PKGBUILD | 8 | ||||
-rw-r--r-- | fix-smart-resize-with-x11-frame-borders.patch | 54 |
3 files changed, 62 insertions, 4 deletions
@@ -1,7 +1,7 @@ pkgbase = rxvt-unicode-wcwidthcallback pkgdesc = rxvt-unicode terminal emulator (urxvt) with wcwidth callback for better wide glyph handling of Xft fonts pkgver = 9.22 - pkgrel = 2 + pkgrel = 3 url = http://software.schmorp.de/pkg/rxvt-unicode.html arch = i686 arch = x86_64 @@ -19,6 +19,7 @@ pkgbase = rxvt-unicode-wcwidthcallback source = urxvt-tabbed.desktop source = line-spacing-fix.patch source = https://gist.githubusercontent.com/alexoj/df5bae7a4825cb596581/raw/75a1e75c2ae1ec5c0db68a29f8a6821e9e3d87a5/sgr-mouse-mode.patch + source = fix-smart-resize-with-x11-frame-borders.patch source = wcwidthcallback.patch sha1sums = e575b869782fbfed955f84f48b204ec888d91ba1 sha1sums = b5a4507f85ebb7bac589db2e07d9bc40106720d9 @@ -26,6 +27,7 @@ pkgbase = rxvt-unicode-wcwidthcallback sha1sums = cd204d608d114d39c80331efe0af0231ad6b7e18 sha1sums = b7fde1c46af45e831828738874f14b092b1e795f sha1sums = dfbc8729c545105eff21e20ef3a4a3841a68a192 + sha1sums = 6dfa49a211c48193c8d87fb9993ed459b2b4387b sha1sums = af4cf72f84d07a35b7d99ab8030e7042450a305b pkgname = rxvt-unicode-wcwidthcallback @@ -18,7 +18,7 @@ _pkgname=rxvt-unicode pkgname=rxvt-unicode-wcwidthcallback pkgver=9.22 -pkgrel=2 +pkgrel=3 pkgdesc='rxvt-unicode terminal emulator (urxvt) with wcwidth callback for better wide glyph handling of Xft fonts' arch=('i686' 'x86_64') url='http://software.schmorp.de/pkg/rxvt-unicode.html' @@ -33,6 +33,7 @@ source=(http://dist.schmorp.de/rxvt-unicode/$_pkgname-$pkgver.tar.bz2 'urxvt-tabbed.desktop' 'line-spacing-fix.patch' 'https://gist.githubusercontent.com/alexoj/df5bae7a4825cb596581/raw/75a1e75c2ae1ec5c0db68a29f8a6821e9e3d87a5/sgr-mouse-mode.patch' + 'fix-smart-resize-with-x11-frame-borders.patch' # will be in 9.23. # https://github.com/exg/rxvt-unicode/compare/master...blueyed:wcwidth-hack.diff 'wcwidthcallback.patch') sha1sums=('e575b869782fbfed955f84f48b204ec888d91ba1' @@ -41,6 +42,7 @@ sha1sums=('e575b869782fbfed955f84f48b204ec888d91ba1' 'cd204d608d114d39c80331efe0af0231ad6b7e18' 'b7fde1c46af45e831828738874f14b092b1e795f' 'dfbc8729c545105eff21e20ef3a4a3841a68a192' + '6dfa49a211c48193c8d87fb9993ed459b2b4387b' 'af4cf72f84d07a35b7d99ab8030e7042450a305b') prepare() { @@ -54,6 +56,7 @@ prepare() { patch -p0 -i ../line-spacing-fix.patch patch -p0 -i ../sgr-mouse-mode.patch + patch -p1 -i ../fix-smart-resize-with-x11-frame-borders.patch # Remove new files to make the patch apply when rebuilding. Is there a option for `patch`?! rm -f src/rxvtwcwidth.C src/rxvtwcwidth.h README.md @@ -63,7 +66,6 @@ prepare() { build() { cd $_pkgname-$pkgver - # we disable smart-resize (FS#34807); will be fixed in 9.23. # do not specify --with-terminfo (FS#46424) ./configure \ --prefix=/usr \ @@ -81,7 +83,7 @@ build() { --enable-rxvt-scroll \ --enable-selectionscrolling \ --enable-slipwheeling \ - --disable-smart-resize \ + --enable-smart-resize \ --enable-startup-notification \ --enable-transparency \ --enable-unicode3 \ diff --git a/fix-smart-resize-with-x11-frame-borders.patch b/fix-smart-resize-with-x11-frame-borders.patch new file mode 100644 index 000000000000..9311f9d70d8d --- /dev/null +++ b/fix-smart-resize-with-x11-frame-borders.patch @@ -0,0 +1,54 @@ +commit bec3f19 +Author: Emanuele Giaquinta <e.giaquinta@glauco.it> +Date: Tue Jun 28 21:56:17 2016 +0000 + + Fix invalid moves when smart resize is enabled and the wm uses X11 borders for the frame windows. + + Patch by Uli Schlachter. +--- + src/main.C | 25 +++++++++++++++++++++++-- + 1 file changed, 23 insertions(+), 2 deletions(-) + +diff --git a/src/main.C b/src/main.C +index 39aa5ec..5fa605e 100644 +--- a/src/main.C ++++ b/src/main.C +@@ -1054,6 +1054,25 @@ rxvt_term::alias_color (int dst, int src) + pix_colors[dst].set (this, rs[Rs_color + dst] = rs[Rs_color + src]); + } + ++#ifdef SMART_RESIZE ++static unsigned int ++get_parent_bw (Display *dpy, Window w) ++{ ++ int idummy; ++ unsigned int udummy; ++ Window wdummy, parent; ++ Window *children; ++ unsigned int nchildren, border_width; ++ ++ XQueryTree (dpy, w, &wdummy, &parent, &children, &nchildren); ++ XFree (children); ++ XGetGeometry (dpy, parent, &wdummy, &idummy, &idummy, ++ &udummy, &udummy, &border_width, &udummy); ++ ++ return border_width; ++} ++#endif ++ + /* -------------------------------------------------------------------- * + * - WINDOW RESIZING - * + * -------------------------------------------------------------------- */ +@@ -1098,8 +1117,10 @@ rxvt_term::resize_all_windows (unsigned int newwidth, unsigned int newheight, in + */ + if (x1 != x || y1 != y) + { +- x -= x1; +- y -= y1; ++ unsigned int border_width = get_parent_bw (dpy, parent); ++ ++ x -= x1 + border_width; ++ y -= y1 + border_width; + } + + x1 = (DisplayWidth (dpy, display->screen) - old_width ) / 2; |