Date: Tuesday, October 18, 2016 @ 13:51:50
  Author: foutrelis
Revision: 278919

upgpkg: xfce4-terminal 0.8.0-2

Pull upstream patch that sets window hints correctly.

Added:
  
xfce4-terminal/trunk/0001-Set-window-hints-properly-showes-columns-rows-when-r.patch
Modified:
  xfce4-terminal/trunk/PKGBUILD

-----------------------------------------------------------------+
 0001-Set-window-hints-properly-showes-columns-rows-when-r.patch |   77 
++++++++++
 PKGBUILD                                                        |   15 +
 2 files changed, 89 insertions(+), 3 deletions(-)

Added: 0001-Set-window-hints-properly-showes-columns-rows-when-r.patch
===================================================================
--- 0001-Set-window-hints-properly-showes-columns-rows-when-r.patch             
                (rev 0)
+++ 0001-Set-window-hints-properly-showes-columns-rows-when-r.patch     
2016-10-18 13:51:50 UTC (rev 278919)
@@ -0,0 +1,77 @@
+From 980003baf92afed64c7958dbaf1a92c3aca402cb Mon Sep 17 00:00:00 2001
+From: Igor <f2...@yandex.ru>
+Date: Tue, 18 Oct 2016 14:56:47 +0300
+Subject: [PATCH] Set window hints properly; showes columns/rows when resizing
+
+Fixes https://bugzilla.xfce.org/show_bug.cgi?id=12793
+---
+ terminal/terminal-screen.c | 36 ++++++++++++++++++++++++------------
+ 1 file changed, 24 insertions(+), 12 deletions(-)
+
+diff --git a/terminal/terminal-screen.c b/terminal/terminal-screen.c
+index 0351437..311f02f 100644
+--- a/terminal/terminal-screen.c
++++ b/terminal/terminal-screen.c
+@@ -1673,35 +1673,47 @@ terminal_screen_get_geometry (TerminalScreen *screen,
+  *
+  * I don't like this way, but its required to work-around a Gtk+
+  * bug (maybe also caused by a Vte bug, not sure).
++ *
++ * Code borrowed from gnome-terminal (terminal_window_update_geometry).
+  **/
+ void
+ terminal_screen_set_window_geometry_hints (TerminalScreen *screen,
+                                            GtkWindow      *window)
+ {
+-  GdkGeometry  hints;
+-  gint         xpad;
+-  gint         ypad;
+-  glong        char_width;
+-  glong        char_height;
++  GdkGeometry    hints;
++  GtkRequisition vbox_request;
++  GtkAllocation  toplevel_allocation, vbox_allocation;
++  glong          char_width, char_height;
++  glong          grid_width, grid_height;
++  glong          chrome_width, chrome_height;
++  gint           csd_width, csd_height;
+ 
+   terminal_return_if_fail (TERMINAL_IS_SCREEN (screen));
+   terminal_return_if_fail (VTE_IS_TERMINAL (screen->terminal));
+   terminal_return_if_fail (gtk_widget_get_realized (screen));
+   terminal_return_if_fail (gtk_widget_get_realized (window));
+ 
+-  terminal_screen_get_geometry (screen,
+-                                &char_width, &char_height,
+-                                &xpad, &ypad);
++  terminal_screen_get_geometry (screen, &char_width, &char_height, NULL, 
NULL);
++  terminal_screen_get_size (screen, &grid_width, &grid_height);
++
++  gtk_widget_get_preferred_size (TERMINAL_WINDOW (window)->vbox, NULL, 
&vbox_request);
++  chrome_width = vbox_request.width - (char_width * grid_width);
++  chrome_height = vbox_request.height - (char_height * grid_height);
++
++  gtk_widget_get_allocation (TERMINAL_WINDOW (window)->vbox, 
&vbox_allocation);
++  gtk_widget_get_allocation (GTK_WIDGET (window), &toplevel_allocation);
++  csd_width = toplevel_allocation.width - vbox_allocation.width;
++  csd_height = toplevel_allocation.height - vbox_allocation.height;
+ 
+-  hints.base_width = xpad;
+-  hints.base_height = ypad;
++  hints.base_width = chrome_width + csd_width;
++  hints.base_height = chrome_height + csd_height;
+   hints.width_inc = char_width;
+   hints.height_inc = char_height;
+   hints.min_width = hints.base_width + hints.width_inc * 4;
+   hints.min_height = hints.base_height + hints.height_inc * 2;
+ 
+-  gtk_window_set_geometry_hints (GTK_WINDOW (window),
+-                                 screen->terminal,
++  gtk_window_set_geometry_hints (window,
++                                 NULL,
+                                  &hints,
+                                  GDK_HINT_RESIZE_INC
+                                  | GDK_HINT_MIN_SIZE
+-- 
+2.10.0
+

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2016-10-18 13:51:48 UTC (rev 278918)
+++ PKGBUILD    2016-10-18 13:51:50 UTC (rev 278919)
@@ -5,7 +5,7 @@
 
 pkgname=xfce4-terminal
 pkgver=0.8.0
-pkgrel=1
+pkgrel=2
 pkgdesc="A modern terminal emulator primarly for the Xfce desktop environment"
 arch=('i686' 'x86_64')
 url="http://www.xfce.org/";
@@ -15,9 +15,18 @@
 makedepends=('intltool')
 conflicts=('terminal')
 replaces=('terminal')
-source=(http://archive.xfce.org/src/apps/$pkgname/${pkgver%.*}/$pkgname-$pkgver.tar.bz2)
-sha256sums=('e915c05a3d07b66d153e1ba8614f904f9c12b2dd8372b27d24c0d339743d5b0a')
+source=(http://archive.xfce.org/src/apps/$pkgname/${pkgver%.*}/$pkgname-$pkgver.tar.bz2
+        0001-Set-window-hints-properly-showes-columns-rows-when-r.patch)
+sha256sums=('e915c05a3d07b66d153e1ba8614f904f9c12b2dd8372b27d24c0d339743d5b0a'
+            'f746972fc29ca7de603ebf5cb9faaa5a12aa12f053380a8acc29d73dbb2dd262')
 
+prepare() {
+  cd "$srcdir/$pkgname-$pkgver"
+
+  # https://bugzilla.xfce.org/show_bug.cgi?id=12793
+  patch -Np1 -i 
../0001-Set-window-hints-properly-showes-columns-rows-when-r.patch
+}
+
 build() {
   cd "$srcdir/$pkgname-$pkgver"
 

Reply via email to