[gtk+/wip/csd-for-review: 1/9] application-window: Respect allocation of any decorations
- From: Rob Bradford <rbradford src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/csd-for-review: 1/9] application-window: Respect allocation of any decorations
- Date: Thu, 21 Feb 2013 17:35:18 +0000 (UTC)
commit 47e7c34a014199c1a5d6e12257ae3ad7e58359f0
Author: Rob Bradford <rob linux intel com>
Date: Fri Apr 13 17:16:55 2012 +0100
application-window: Respect allocation of any decorations
Since _gtk_window_set_allocation () updates the allocation in place and may
update it to a smaller allocation (to allow the application of decorations) we
shouldn't setup the basis for the menubar's allocation until after this
function has been called.
gtk/gtkapplicationwindow.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/gtk/gtkapplicationwindow.c b/gtk/gtkapplicationwindow.c
index 271054b..9835dcc 100644
--- a/gtk/gtkapplicationwindow.c
+++ b/gtk/gtkapplicationwindow.c
@@ -703,12 +703,14 @@ gtk_application_window_real_size_allocate (GtkWidget *widget,
if (window->priv->menubar != NULL)
{
- GtkAllocation menubar_allocation = *allocation;
+ GtkAllocation menubar_allocation;
gint menubar_height;
GtkWidget *child;
+ /* Updates allocation to be the child allocation area for the window */
_gtk_window_set_allocation (GTK_WINDOW (widget), allocation);
+ menubar_allocation = *allocation;
gtk_widget_get_preferred_height_for_width (window->priv->menubar, allocation->width, &menubar_height,
NULL);
menubar_allocation.height = menubar_height;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]