make sure we don't draw the overlay window into itself
[dana/dcompmgr.git] / screen.c
index 91b1975..6d454c3 100644 (file)
--- a/screen.c
+++ b/screen.c
@@ -8,6 +8,7 @@
 #include "window.h"
 #include "gettext.h"
 #include <string.h>
+#include <assert.h>
 #include <stdlib.h>
 #include <stdio.h>
 #include <xcb/composite.h>
@@ -259,6 +260,8 @@ screen_add_window(d_screen_t *sc, xcb_window_t wid)
 {
     d_window_t *w;
 
+    assert(wid != sc->overlay);
+
     w = window_new(wid, sc);
     g_hash_table_insert(sc->winhash, &w->id, w);