[gtk+/wip/csd] window: Fix coding style in gtk_window_draw implementation
- From: Rob Bradford <rbradford src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/csd] window: Fix coding style in gtk_window_draw implementation
- Date: Thu, 31 Jan 2013 17:25:36 +0000 (UTC)
commit a4fa33bb73bd0ac8b4b1e3e295b4f70627495277
Author: Rob Bradford <rob linux intel com>
Date: Thu Jan 31 16:48:12 2013 +0000
window: Fix coding style in gtk_window_draw implementation
gtk/gtkwindow.c | 45 ++++++++++++++++++++++++---------------------
1 files changed, 24 insertions(+), 21 deletions(-)
---
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index b6ae702..0ca584f 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -8142,28 +8142,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);
}
@@ -8174,6 +8176,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,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]