summaryrefslogtreecommitdiff
path: root/gtk/window-decorator/decorprops.c
diff options
context:
space:
mode:
Diffstat (limited to 'gtk/window-decorator/decorprops.c')
-rw-r--r--gtk/window-decorator/decorprops.c44
1 files changed, 35 insertions, 9 deletions
diff --git a/gtk/window-decorator/decorprops.c b/gtk/window-decorator/decorprops.c
index b6b3820..92cd36d 100644
--- a/gtk/window-decorator/decorprops.c
+++ b/gtk/window-decorator/decorprops.c
@@ -1,3 +1,28 @@
+/*
+ * Copyright © 2006 Novell, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ * Author: David Reveman <davidr@novell.com>
+ *
+ * 2D Mode: Copyright © 2010 Sam Spilsbury <smspillaz@gmail.com>
+ * Frames Management: Copright © 2011 Canonical Ltd.
+ * Authored By: Sam Spilsbury <sam.spilsbury@canonical.com>
+ */
+
#include "gtk-window-decorator.h"
void
@@ -6,7 +31,7 @@ decor_update_window_property (decor_t *d)
long data[256];
Display *xdisplay =
GDK_DISPLAY_XDISPLAY (gdk_display_get_default ());
- decor_extents_t extents = _win_extents;
+ decor_extents_t extents = d->frame->win_extents;
gint nQuad;
decor_quad_t quads[N_QUADS_MAX];
int w, h;
@@ -27,7 +52,7 @@ decor_update_window_property (decor_t *d)
&d->border_layout,
stretch_offset);
- extents.top += titlebar_height;
+ extents.top += d->frame->titlebar_height;
if (d->frame_window)
{
@@ -36,7 +61,8 @@ decor_update_window_property (decor_t *d)
else
{
decor_quads_to_property (data, GDK_PIXMAP_XID (d->pixmap),
- &extents, &extents, &extents, &extents,
+ &extents, &extents,
+ &extents, &extents,
ICON_SPACE + d->button_width,
0,
quads, nQuad);
@@ -101,20 +127,20 @@ decor_update_switcher_property (decor_t *d)
GtkStyle *style;
long fgColor[4];
- nQuad = decor_set_lSrStSbX_window_quads (quads, &switcher_context,
+ nQuad = decor_set_lSrStSbX_window_quads (quads, &d->frame->window_context,
&d->border_layout,
d->border_layout.top.x2 -
d->border_layout.top.x1 -
- switcher_context.extents.left -
- switcher_context.extents.right -
+ d->frame->window_context.extents.left -
+ d->frame->window_context.extents.right -
32);
decor_quads_to_property (data, GDK_PIXMAP_XID (d->pixmap),
- &_switcher_extents, &_switcher_extents,
- &_switcher_extents, &_switcher_extents,
+ &d->frame->win_extents, &d->frame->win_extents,
+ &d->frame->win_extents, &d->frame->win_extents,
0, 0, quads, nQuad);
- style = gtk_widget_get_style (style_window_rgba);
+ style = gtk_widget_get_style (d->frame->style_window_rgba);
fgColor[0] = style->fg[GTK_STATE_NORMAL].red;
fgColor[1] = style->fg[GTK_STATE_NORMAL].green;