[gtk+] gtkwindow: apply CSD in configure size request
- From: Olivier Fourdan <ofourdan src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] gtkwindow: apply CSD in configure size request
- Date: Wed, 2 Dec 2015 07:56:14 +0000 (UTC)
commit e933233479d8fcecd9edfb3d7473f32a2ab21c2c
Author: Olivier Fourdan <ofourdan redhat com>
Date: Wed Nov 25 15:30:52 2015 +0100
gtkwindow: apply CSD in configure size request
Just like we did for the default size, that reduces the chances of
having the headerbar missing or wrongly sized when computing the client
side decorations controls.
https://bugzilla.gnome.org/show_bug.cgi?id=756618
gtk/gtkwindow.c | 17 +++++++++++------
1 files changed, 11 insertions(+), 6 deletions(-)
---
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index e9d0215..5cb743a 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -5319,7 +5319,6 @@ gtk_window_resize (GtkWindow *window,
g_return_if_fail (height > 0);
info = gtk_window_get_geometry_info (window, TRUE);
- gtk_window_update_csd_size (window, &width, &height, INCLUDE_CSD_SIZE);
info->resize_width = width;
info->resize_height = height;
@@ -8973,15 +8972,21 @@ gtk_window_compute_configure_request_size (GtkWindow *window,
}
else if (info)
{
+ gint resize_width_csd = info->resize_width;
+ gint resize_height_csd = info->resize_height;
+ gtk_window_update_csd_size (window,
+ &resize_width_csd, &resize_height_csd,
+ INCLUDE_CSD_SIZE);
+
if (info->resize_width > 0)
- *width = info->resize_width;
+ *width = resize_width_csd;
if (info->resize_height > 0)
- *height = info->resize_height;
+ *height = resize_height_csd;
if (info->resize_is_geometry)
- geometry_size_to_pixels (geometry, flags,
- info->resize_width > 0 ? width : NULL,
- info->resize_height > 0 ? height : NULL);
+ geometry_size_to_pixels (geometry, flags,
+ info->resize_width > 0 ? width : NULL,
+ info->resize_height > 0 ? height : NULL);
}
/* Don't ever request zero width or height, it's not supported by
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]