[gtk+] window: Fix child wfh size request
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] window: Fix child wfh size request
- Date: Tue, 17 Sep 2013 13:54:30 +0000 (UTC)
commit 8c0516a5f10be4b0949dff1cfc72562fabffbe98
Author: Benjamin Otte <otte redhat com>
Date: Tue Sep 17 15:52:27 2013 +0200
window: Fix child wfh size request
We need to subtract border_width from the size we're passing to the
children hfw functions as those are added by ourselves.
Fixes the window-border-width.ui reftest.
gtk/gtkwindow.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 93422cb..a8aeceb 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -7792,6 +7792,8 @@ gtk_window_get_preferred_width_for_height (GtkWidget *widget,
border_width = gtk_container_get_border_width (GTK_CONTAINER (window));
+ height -= 2 * border_width;
+
if (priv->decorated &&
!priv->fullscreen)
{
@@ -7896,6 +7898,8 @@ gtk_window_get_preferred_height_for_width (GtkWidget *widget,
border_width = gtk_container_get_border_width (GTK_CONTAINER (window));
+ width -= 2 * border_width;
+
if (priv->decorated &&
!priv->fullscreen)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]