[gtk+] Avoid ugly seams on half-tiled terminals
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Avoid ugly seams on half-tiled terminals
- Date: Mon, 7 Dec 2015 15:12:34 +0000 (UTC)
commit f7cc4abbad76f354cdc740e7fb9192719f72a89a
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Dec 7 10:11:06 2015 -0500
Avoid ugly seams on half-tiled terminals
Since we're no longer doing geometry widgets, don't send
base size and increments to the window manager anymore either.
This avoids an ugly 2 pixel gap to the right and bottom of half-tiled
terminals under gnome-shell.
gtk/gtkwindow.c | 14 +++++++-------
1 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index ee10d3f..b8476c0 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -3994,9 +3994,8 @@ gtk_window_get_geometry_info (GtkWindow *window,
* the user. You can set a minimum and maximum size; allowed resize
* increments (e.g. for xterm, you can only resize by the size of a
* character); aspect ratios; and more. See the #GdkGeometry struct.
- *
- **/
-void
+ */
+void
gtk_window_set_geometry_hints (GtkWindow *window,
GtkWidget *geometry_widget,
GdkGeometry *geometry,
@@ -4008,17 +4007,18 @@ gtk_window_set_geometry_hints (GtkWindow *window,
g_return_if_fail (geometry_widget == NULL || GTK_IS_WIDGET (geometry_widget));
info = gtk_window_get_geometry_info (window, TRUE);
-
+
if (geometry)
info->geometry = *geometry;
/* We store gravity in priv->gravity not in the hints. */
info->mask = geom_mask & ~(GDK_HINT_WIN_GRAVITY);
+ if (geometry_widget)
+ info->mask &= ~(GDK_HINT_BASE_SIZE | GDK_HINT_RESIZE_INC);
+
if (geom_mask & GDK_HINT_WIN_GRAVITY)
- {
- gtk_window_set_gravity (window, geometry->win_gravity);
- }
+ gtk_window_set_gravity (window, geometry->win_gravity);
gtk_widget_queue_resize_no_redraw (GTK_WIDGET (window));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]