get attributes/geometry/pixmap for windows
[dana/dcompmgr.git] / render.c
index 1843cc4..5aafc6e 100644 (file)
--- a/render.c
+++ b/render.c
@@ -1,5 +1,7 @@
 #include "render.h"
 #include "screen.h"
+#include "window.h"
+#include "list.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <xcb/render.h>
@@ -11,6 +13,8 @@ typedef struct {
 } data_t;
 
 static void render_paint_screen(d_screen_t *sc);
+static void paint_root(d_screen_t *sc);
+static void paint_window(d_window_t *window);
 
 void
 render_init(d_screen_t *sc)
@@ -33,9 +37,30 @@ static void
 render_paint_screen(d_screen_t *sc)
 {
     data_t *d = screen_find_plugin_data(sc, PLUGIN_NAME);
+    d_list_it_t *it;
 
     printf("-- painting --\n");
+    paint_root(sc);
+    for (it = list_bottom(sc->stacking); it; it = it->prev)
+        paint_window(it->data);
 
     /* call the function we replaced in the chain */
     d->screen_paint(sc);
 }
+
+static void
+paint_root(d_screen_t *sc)
+{
+    int w, h;
+
+    w = sc->super.width_in_pixels;
+    h = sc->super.height_in_pixels;
+
+    //printf("-- paint root 0x%x --\n", sc->super.root);
+}
+
+static void
+paint_window(d_window_t *w)
+{
+    //printf("-- paint window 0x%x --\n", w->id);
+}