[gtk+/gtk-3-22] Fix several issues with resizing
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-3-22] Fix several issues with resizing
- Date: Wed, 4 Oct 2017 11:36:08 +0000 (UTC)
commit 899cfb3c50e013589540c59c57ba0dd3722255e7
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Oct 4 07:34:30 2017 -0400
Fix several issues with resizing
Some of the border windows were not placed correctly.
Patch by Jan Steffens.
gtk/gtkwindow.c | 21 +++++++--------------
1 files changed, 7 insertions(+), 14 deletions(-)
---
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index ffc8418..a4ba098 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -6855,7 +6855,7 @@ update_corner_windows (GtkWindow *window,
region, 0, 0);
cairo_region_destroy (region);
- gdk_window_hide (priv->border_window[GDK_WINDOW_EDGE_NORTH_EAST]);
+ gdk_window_show_unraised (priv->border_window[GDK_WINDOW_EDGE_NORTH_EAST]);
}
else
{
@@ -7065,13 +7065,13 @@ update_border_windows (GtkWindow *window)
if (resize_n)
{
- y += window_border.top;
+ y += window_border.top + handle_v;
h -= window_border.top + handle_v;
}
if (resize_w)
{
- x += window_border.left;
+ x += window_border.left + handle_h;
w -= window_border.left + handle_h;
}
@@ -7084,9 +7084,9 @@ update_border_windows (GtkWindow *window)
/* North */
if (resize_n)
{
- gdk_window_move_resize (priv->border_window[GDK_WINDOW_EDGE_SOUTH],
- x, window_border.top + height,
- w, border.bottom);
+ gdk_window_move_resize (priv->border_window[GDK_WINDOW_EDGE_NORTH],
+ x, window_border.top - border.top,
+ w, border.top);
gdk_window_show_unraised (priv->border_window[GDK_WINDOW_EDGE_NORTH]);
}
@@ -7096,7 +7096,7 @@ update_border_windows (GtkWindow *window)
}
/* South */
- if (resize_n)
+ if (resize_s)
{
gdk_window_move_resize (priv->border_window[GDK_WINDOW_EDGE_SOUTH],
x, window_border.top + height,
@@ -7109,13 +7109,6 @@ update_border_windows (GtkWindow *window)
gdk_window_hide (priv->border_window[GDK_WINDOW_EDGE_SOUTH]);
}
- /*
- * Horizontal edges
- */
-
- y = (resize_n || resize_s) ? window_border.top + handle_v : 0;
- h = (resize_n || resize_s) ? height - 2 * handle_v : height + window_border.top + window_border.bottom;
-
/* East */
if (resize_e)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]