[gtk+/wip/csd] window: Refactor title allocation to use specific stack variable
- From: Rob Bradford <rbradford src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/csd] window: Refactor title allocation to use specific stack variable
- Date: Thu, 31 Jan 2013 17:25:16 +0000 (UTC)
commit f01961d697c129d8bf89c15bbe0be6b31145b43c
Author: Rob Bradford <rob linux intel com>
Date: Thu Jan 31 12:07:03 2013 +0000
window: Refactor title allocation to use specific stack variable
gtk/gtkwindow.c | 15 ++++++++++-----
1 files changed, 10 insertions(+), 5 deletions(-)
---
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index accbcc2..2afb65a 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -5721,17 +5721,22 @@ _gtk_window_set_allocation (GtkWindow *window,
gtk_widget_set_allocation (widget, allocation);
border_width = gtk_container_get_border_width (GTK_CONTAINER (window));
+
if (priv->title_box && gtk_widget_get_visual(priv->title_box))
{
- child_allocation.x = priv->title_border.left + priv->window_border.left;
- child_allocation.y = priv->title_border.top + priv->window_border.top;
- child_allocation.width =
+ GtkAllocation title_allocation;
+
+ title_allocation.x = priv->title_border.left +
+ priv->window_border.left;
+ title_allocation.y = priv->title_border.top +
+ priv->window_border.top;
+ title_allocation.width =
MAX (1, (gint) allocation->width -
priv->title_border.left - priv->title_border.right -
priv->window_border.left - priv->window_border.right);
- child_allocation.height = priv->title_height;
+ title_allocation.height = priv->title_height;
- gtk_widget_size_allocate (priv->title_box, &child_allocation);
+ gtk_widget_size_allocate (priv->title_box, &title_allocation);
}
child_allocation.x = border_width + priv->window_border.left;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]