initialize gl on the overlay window
[dana/dcompmgr.git] / dcompmgr.c
index 8dcaa1f..47c6a1d 100644 (file)
@@ -9,6 +9,7 @@
 
 /* these can be plugins */
 #include "render.h"
+#include "glxrender.h"
 #include "fade.h"
 
 #include <glib.h>
@@ -277,6 +278,8 @@ timeouts(d_display_t *dpy, const struct timeval *now)
         d_screen_t *sc = it->data;
         struct timeval tv;
 
+        if (glxrender_next_timeout(sc, &tv) && time_compare(&tv, now) <= 0)
+            glxrender_timeout(sc, now);
         if (render_next_timeout(sc, &tv) && time_compare(&tv, now) <= 0)
             render_timeout(sc, now);
         if (fade_next_timeout(sc, &tv) && time_compare(&tv, now) <= 0)
@@ -321,6 +324,12 @@ run(d_display_t *dpy)
             d_screen_t *sc = it->data;
             struct timeval next_timeout;
 
+            if (glxrender_next_timeout(sc, &next_timeout)) {
+                if (!ntime || time_compare(&next_timeout, &next) < 0) {
+                    next = next_timeout;
+                    ++ntime;
+                }
+            }
             if (render_next_timeout(sc, &next_timeout)) {
                 if (!ntime || time_compare(&next_timeout, &next) < 0) {
                     next = next_timeout;
@@ -401,7 +410,8 @@ setup_functions(d_display_t *dpy)
 
         /* these can be plugins.. */
         id = 1;
-        render_init(sc, id++);
+        glxrender_init(sc, id++);
+        //render_init(sc, id++);
         fade_init(sc, id++);
     }
 }
@@ -416,7 +426,8 @@ cleanup_functions(d_display_t *dpy)
 
         /* these can be plugins.. */
         fade_free(sc);
-        render_free(sc);
+        //render_free(sc);
+        glxrender_free(sc);
     }
 }