summaryrefslogtreecommitdiff
path: root/gtk/window-decorator
diff options
context:
space:
mode:
authorSam Spilsbury <smspillaz@gmail.com>2010-10-03 14:21:19 +0800
committerSam Spilsbury <smspillaz@gmail.com>2010-10-24 22:42:07 +0800
commit7ba6a2386fd61025e0a11919e42c6b1363288fc9 (patch)
treee5d17d1f5f8def827c9725a3bf5162c682de72cf /gtk/window-decorator
parent0301c9f5e600dd9e9e600091af954aa065152097 (diff)
downloadcompiz-with-glib-mainloop-7ba6a2386fd61025e0a11919e42c6b1363288fc9.tar.gz
compiz-with-glib-mainloop-7ba6a2386fd61025e0a11919e42c6b1363288fc9.tar.bz2
Don't reparent so overzealously.
Also tweak offset code to handle shadow offsets. Unfortunately this breaks some themes. However, the standard ones such as Clearlooks and friends should continue to work
Diffstat (limited to 'gtk/window-decorator')
-rw-r--r--gtk/window-decorator/cairo.c4
-rw-r--r--gtk/window-decorator/events.c3
-rw-r--r--gtk/window-decorator/metacity.c9
-rw-r--r--gtk/window-decorator/settings.c2
4 files changed, 11 insertions, 7 deletions
diff --git a/gtk/window-decorator/cairo.c b/gtk/window-decorator/cairo.c
index 82c7f6a..6dd4404 100644
--- a/gtk/window-decorator/cairo.c
+++ b/gtk/window-decorator/cairo.c
@@ -676,8 +676,8 @@ draw_window_decoration (decor_t *d)
gtk_image_set_from_pixmap (GTK_IMAGE (d->decor_image), d->pixmap, NULL);
gtk_window_resize (GTK_WINDOW (d->decor_window), d->width, d->height);
- gdk_window_reparent (gdk_frame_window, d->frame_window,
- -_win_extents.left - 2, -_win_extents.top - 2);
+ gdk_window_move (gdk_frame_window, -(d->context->left_space - _win_extents.left),
+ -(d->context->top_space - d->context->bottom_space) - shadow_offset_y - 1);
gdk_window_lower (gdk_frame_window);
}
diff --git a/gtk/window-decorator/events.c b/gtk/window-decorator/events.c
index 13f6c07..6c3af32 100644
--- a/gtk/window-decorator/events.c
+++ b/gtk/window-decorator/events.c
@@ -625,8 +625,7 @@ frame_window_realized (GtkWidget *widget,
if (d)
{
GdkWindow *gdk_frame_window = gtk_widget_get_window (d->decor_window);
- gdk_window_reparent (gdk_frame_window, d->frame_window,
- -_win_extents.left - 2, -_win_extents.top - 2);
+ gdk_window_reparent (gdk_frame_window, d->frame_window, 0, 0);
gdk_window_lower (gdk_frame_window);
}
diff --git a/gtk/window-decorator/metacity.c b/gtk/window-decorator/metacity.c
index cf3d3eb..0c61164 100644
--- a/gtk/window-decorator/metacity.c
+++ b/gtk/window-decorator/metacity.c
@@ -862,9 +862,14 @@ meta_draw_window_decoration (decor_t *d)
extents = _win_extents;
}
+ /*
+ * FIXME: What is '4' supposed to be for here...
+ */
+
gtk_image_set_from_pixmap (GTK_IMAGE (d->decor_image), d->pixmap, NULL);
gtk_window_resize (GTK_WINDOW (d->decor_window), d->width, d->height);
- gdk_window_reparent (gdk_frame_window, d->frame_window, -(d->context->left_space - extents.left), -d->context->bottom_space + extents.bottom + 2);
+ gdk_window_move (gdk_frame_window, -(d->context->left_space - extents.left),
+ -(d->context->top_space - d->context->bottom_space) - shadow_offset_y);
gdk_window_lower (gdk_frame_window);
}
@@ -1114,7 +1119,7 @@ meta_calc_decoration_size (decor_t *d,
*height = layout.height;
d->border_layout = layout;
-
+ d->shadow = NULL;
d->context = context;
meta_calc_button_size (d);
diff --git a/gtk/window-decorator/settings.c b/gtk/window-decorator/settings.c
index b343ea9..f158636 100644
--- a/gtk/window-decorator/settings.c
+++ b/gtk/window-decorator/settings.c
@@ -15,7 +15,7 @@ shadow_property_changed (WnckScreen *s)
int result, format;
unsigned long n, left;
unsigned char *prop_data;
- gboolean changed = 0;
+ gboolean changed = FALSE;
XTextProperty shadow_color_xtp;
result = XGetWindowProperty (xdisplay, root, compiz_shadow_info_atom,