create the gltexture for an obwindow when you hear about the top-level window creation.
authorDana Jansens <danakj@orodu.net>
Thu, 10 Jun 2010 18:00:20 +0000 (14:00 -0400)
committerDana Jansens <danakj@orodu.net>
Sat, 26 Jun 2010 23:30:47 +0000 (01:30 +0200)
was occuring before gl was initialized.

openbox/event.c
openbox/window.c

index 115e288089d7a3ca68e2a773bbf41a6ba0adf234..990b877152ba5c407ab0c16f49092b63c95f5617 100644 (file)
@@ -628,6 +628,7 @@ static void event_process(const XEvent *ec, gpointer data)
         if (xe->window == window_top(obwin)) {
             obwin->mapped = 0;
             RECT_SET(obwin->comp_area, xe->x, xe->y, xe->width, xe->height);
+            if (!obwin->texture) glGenTextures(1, &obwin->texture);
         }
     } else if ((e->type == ConfigureNotify || e->type == MapNotify)
              && obwin && obwin->type != OB_WINDOW_CLASS_PROMPT) {
index b139af5684887497f5a97827e7d8dc97cf0eb1d4..51d506f8a23145dc851faa20f5f3dfb28ecde246 100644 (file)
@@ -56,11 +56,6 @@ ObWindow* window_new_size(ObWindowClass type, gsize size)
     self = g_slice_alloc0(size);
     self->size = size;
     self->type = type;
-
-#ifdef USE_COMPOSITING
-    glGenTextures(1, &self->texture);
-#endif
-
     return self;
 }