+render_window_restack(d_window_t *w, d_window_t *above)
+{
+ data_t *d;
+ window_data_t *wd;
+
+ d = screen_find_plugin_data(w->sc, plugin_id);
+ wd = window_find_plugin_data(w, plugin_id);
+
+ /* pass it on */
+ d->window_restack(w, above);
+
+ assert(wd != NULL);
+
+ /* make sure the shadow region is right */
+ render_update_shadow(w, d, wd);
+
+ /* redraw the window's contents, and its shadow as well */
+ xcb_xfixes_union_region(w->sc->dpy->conn, d->damaged_region,
+ window_get_region(w), d->damaged_region);
+ xcb_xfixes_union_region(w->sc->dpy->conn, d->damaged_region,
+ wd->shadow_region, d->damaged_region);
+}
+
+static void
+render_update_shadow(d_window_t *w, data_t *d, window_data_t *wd)
+{
+ if (!wd->shadow_valid) {
+ xcb_xfixes_copy_region(w->sc->dpy->conn, window_get_region(w),
+ wd->shadow_region);
+ xcb_xfixes_translate_region(w->sc->dpy->conn, wd->shadow_region,
+ d->xshadowoff, d->yshadowoff);
+ wd->shadow_valid = TRUE;
+ }
+}
+
+
+static void