r50036 - in /desktop/unstable/gnome-terminal/debian: changelog patches/series patches/window-Fix-CSD-size-calculations-with-long-titles.patch
sjoerd at users.alioth.debian.org
sjoerd at users.alioth.debian.org
Fri Sep 2 21:28:40 UTC 2016
Author: sjoerd
Date: Fri Sep 2 21:28:40 2016
New Revision: 50036
URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=50036
Log:
* debian/patches/window-Fix-CSD-size-calculations-with-long-titles.patch
- Added. Fix terminal window unintentially resizing when using long titles
and CSD (bgo#769898c9)
Modified:
desktop/unstable/gnome-terminal/debian/changelog
desktop/unstable/gnome-terminal/debian/patches/series
desktop/unstable/gnome-terminal/debian/patches/window-Fix-CSD-size-calculations-with-long-titles.patch
Modified: desktop/unstable/gnome-terminal/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gnome-terminal/debian/changelog?rev=50036&op=diff
==============================================================================
--- desktop/unstable/gnome-terminal/debian/changelog [utf-8] (original)
+++ desktop/unstable/gnome-terminal/debian/changelog [utf-8] Fri Sep 2 21:28:40 2016
@@ -1,3 +1,11 @@
+gnome-terminal (3.21.90-3) UNRELEASED; urgency=medium
+
+ * debian/patches/window-Fix-CSD-size-calculations-with-long-titles.patch
+ - Added. Fix terminal window unintentially resizing when using long titles
+ and CSD (bgo#769898c9)
+
+ -- Sjoerd Simons <sjoerd at debian.org> Fri, 02 Sep 2016 23:25:23 +0200
+
gnome-terminal (3.21.90-2) unstable; urgency=medium
* Upload to unstable.
Modified: desktop/unstable/gnome-terminal/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gnome-terminal/debian/patches/series?rev=50036&op=diff
==============================================================================
--- desktop/unstable/gnome-terminal/debian/patches/series [utf-8] (original)
+++ desktop/unstable/gnome-terminal/debian/patches/series [utf-8] Fri Sep 2 21:28:40 2016
@@ -3,5 +3,5 @@
10_kfreebsd-f_dupfd_cloexec.patch
Don-t-allow-the-theme-to-set-black-on-black.patch
Provide-fallback-for-reading-current-directory-if-OS.patch
-#window-Fix-CSD-size-calculations-with-long-titles.patch
Revert-window-Fix-CSD-size-calculations-with-long-ti.patch
+window-Fix-CSD-size-calculations-with-long-titles.patch
Modified: desktop/unstable/gnome-terminal/debian/patches/window-Fix-CSD-size-calculations-with-long-titles.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gnome-terminal/debian/patches/window-Fix-CSD-size-calculations-with-long-titles.patch?rev=50036&op=diff
==============================================================================
--- desktop/unstable/gnome-terminal/debian/patches/window-Fix-CSD-size-calculations-with-long-titles.patch [utf-8] (original)
+++ desktop/unstable/gnome-terminal/debian/patches/window-Fix-CSD-size-calculations-with-long-titles.patch [utf-8] Fri Sep 2 21:28:40 2016
@@ -1,4 +1,4 @@
-From 2664897e513b0cd5fab29788cc31eff8666e027c Mon Sep 17 00:00:00 2001
+From 4b2e3b13003670370b4b3b121fb10802b52b3860 Mon Sep 17 00:00:00 2001
From: Sjoerd Simons <sjoerd at luon.net>
Date: Sun, 14 Aug 2016 22:24:24 +0200
Subject: [PATCH] window: Fix CSD size calculations with long titles
@@ -6,27 +6,39 @@
To get the size of the window use the actual allocation rather then the
preferred size as the latter takes into account the natural size of the
title bar as well as the content which throws of calculation when the
-natural size of the title bar is wider then the contnet.
+natural size of the title bar is wider then the content.
+
+Also use the actual allocation of the content specifically for the
+calculation of the CSD size such that both are in sync, but keep using
+the preferred size otherwise as those values get used for resizing
+calculations.
Signed-off-by: Sjoerd Simons <sjoerd at luon.net>
https://bugzilla.gnome.org/show_bug.cgi?id=769898
---
- src/terminal-window.c | 34 ++++++++++++++++++++++------------
- 1 file changed, 22 insertions(+), 12 deletions(-)
+ src/terminal-window.c | 39 +++++++++++++++++++++++++++------------
+ 1 file changed, 27 insertions(+), 12 deletions(-)
+diff --git a/src/terminal-window.c b/src/terminal-window.c
+index 46676a5..ad59033 100644
--- a/src/terminal-window.c
+++ b/src/terminal-window.c
-@@ -3620,7 +3620,7 @@
- {
- TerminalWindowPrivate *priv = window->priv;
+@@ -3615,11 +3615,11 @@ terminal_window_update_geometry (TerminalWindow *window)
GtkWidget *widget;
-- GtkRequisition toplevel_request, vbox_request;
-+ GtkRequisition vbox_request;
GdkGeometry hints;
+ GtkBorder padding;
+- GtkRequisition toplevel_request, vbox_request, widget_request;
++ GtkRequisition vbox_request, widget_request;
int grid_width, grid_height;
int char_width, char_height;
-@@ -3647,26 +3647,36 @@
+ int chrome_width, chrome_height;
+- int csd_width, csd_height;
++ int csd_width = 0, csd_height = 0;
+
+ if (priv->active_screen == NULL)
+ return;
+@@ -3650,20 +3650,35 @@ terminal_window_update_geometry (TerminalWindow *window)
_terminal_debug_print (TERMINAL_DEBUG_GEOMETRY, "content area requests %dx%d px\n",
vbox_request.width, vbox_request.height);
@@ -51,18 +63,26 @@
+ * the preferred size takes the natural size of e.g. the title bar into
+ * account which can be far wider then the contents size when using a
+ * very long title */
-+ GtkAllocation toplevel_allocation;
++ GtkAllocation toplevel_allocation, vbox_allocation;
++
++ gtk_widget_get_allocation (GTK_WIDGET (priv->main_vbox), &vbox_allocation);
++ _terminal_debug_print (TERMINAL_DEBUG_GEOMETRY,
++ "terminal widget allocation %dx%d px\n",
++ vbox_allocation.width, vbox_allocation.height);
+
+ gtk_widget_get_allocation (GTK_WIDGET (window), &toplevel_allocation);
+ _terminal_debug_print (TERMINAL_DEBUG_GEOMETRY, "window allocation %dx%d px\n",
+ toplevel_allocation.width, toplevel_allocation.height);
+
-+ csd_width = toplevel_allocation.width - vbox_request.width;
-+ csd_height = toplevel_allocation.height - vbox_request.height;
++ csd_width = toplevel_allocation.width - vbox_allocation.width;
++ csd_height = toplevel_allocation.height - vbox_allocation.height;
+ _terminal_debug_print (TERMINAL_DEBUG_GEOMETRY, "CSDs: %dx%d px\n",
+ csd_width, csd_height);
+ }
+ gtk_widget_get_preferred_size (widget, NULL, &widget_request);
+ _terminal_debug_print (TERMINAL_DEBUG_GEOMETRY, "terminal widget requests %dx%d px\n",
+@@ -3672,8 +3687,8 @@ terminal_window_update_geometry (TerminalWindow *window)
if (!priv->realized)
{
/* Don't actually set the geometry hints until we have been realized,
@@ -71,5 +91,8 @@
+ * because we don't know how large the client-side decorations are going
+ * to be. We also avoid setting priv->old_csd_width or
* priv->old_csd_height, so that next time through this function we'll
- * definitely recalculate the hints. */
- }
+ * definitely recalculate the hints.
+ *
+--
+2.9.3
+
More information about the pkg-gnome-commits
mailing list