diff options
author | Rob Bradford <rob@linux.intel.com> | 2013-01-31 16:48:12 +0000 |
---|---|---|
committer | Rob Bradford <rob@linux.intel.com> | 2013-02-07 13:14:54 +0000 |
commit | 5a72b3105fc5698d52965107e2eedda50df3a819 (patch) | |
tree | 60c9effee402e515ba5ac0fdeec71168333372d8 /gtk/gtkwindow.c | |
parent | 1d4fcbe2dd9e48134eea7645071146050e99d859 (diff) | |
download | gtk+-5a72b3105fc5698d52965107e2eedda50df3a819.tar.gz |
window: Fix coding style in gtk_window_draw implementation
Diffstat (limited to 'gtk/gtkwindow.c')
-rw-r--r-- | gtk/gtkwindow.c | 45 |
1 files changed, 24 insertions, 21 deletions
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c index abf946452f..af90bcc73c 100644 --- a/gtk/gtkwindow.c +++ b/gtk/gtkwindow.c @@ -8096,28 +8096,30 @@ gtk_window_draw (GtkWidget *widget, gtk_style_context_add_class (context, GTK_STYLE_CLASS_BACKGROUND); - if (priv->client_decorated && priv->type == GTK_WINDOW_TOPLEVEL) - { - gtk_style_context_add_class (context, "window-border"); - gtk_widget_get_allocation (widget, &allocation); - gtk_render_background (context, cr, - priv->window_border.left, - priv->window_border.top, - allocation.width - - priv->window_border.left - - priv->window_border.right, - allocation.height - - priv->window_border.top - - priv->window_border.bottom); - gtk_render_frame (context, cr, - 0, 0, allocation.width, allocation.height); - } + if (priv->client_decorated && + priv->decorated && + priv->type == GTK_WINDOW_TOPLEVEL) + { + gtk_style_context_add_class (context, "window-border"); + gtk_widget_get_allocation (widget, &allocation); + gtk_render_background (context, cr, + priv->window_border.left, + priv->window_border.top, + allocation.width - + (priv->window_border.left + + priv->window_border.right), + allocation.height - + (priv->window_border.top + + priv->window_border.bottom)); + gtk_render_frame (context, cr, + 0, 0, allocation.width, allocation.height); + } else - { - gtk_widget_get_allocation (widget, &allocation); - gtk_render_background (context, cr, - 0, 0, allocation.width, allocation.height); - } + { + gtk_widget_get_allocation (widget, &allocation); + gtk_render_background (context, cr, + 0, 0, allocation.width, allocation.height); + } gtk_style_context_restore (context); } @@ -8128,6 +8130,7 @@ gtk_window_draw (GtkWidget *widget, gtk_style_context_add_class (context, "titlebar"); gtk_widget_get_allocation (priv->title_box, &allocation); + /* Why do these subtract ? */ gtk_render_background (context, cr, allocation.x - priv->title_border.left, allocation.y - priv->title_border.top, |