From ce1ffa46244a5442fa0a3d2568a2b781918e9a39 Mon Sep 17 00:00:00 2001 From: Adel Gadllah Date: Fri, 30 Jul 2010 16:16:55 +0200 Subject: [PATCH] Check for TFP usage after actually setting the pixmap Starting with clutter 1.4 clutter / cogl only knows whether TFP is in use after setting the pixmap, so doing the check before setting the pixmap will just lead to a wrong message. https://bugzilla.gnome.org/show_bug.cgi?id=624757 --- src/compositor/mutter-window.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/compositor/mutter-window.c b/src/compositor/mutter-window.c index 377611fa7..eb90c9d90 100644 --- a/src/compositor/mutter-window.c +++ b/src/compositor/mutter-window.c @@ -358,10 +358,6 @@ mutter_window_constructed (GObject *object) { priv->actor = mutter_shaped_texture_new (); - if (!clutter_glx_texture_pixmap_using_extension ( - CLUTTER_GLX_TEXTURE_PIXMAP (priv->actor))) - g_warning ("NOTE: Not using GLX TFP!\n"); - clutter_container_add_actor (CLUTTER_CONTAINER (self), priv->actor); /* @@ -1621,6 +1617,14 @@ check_needs_pixmap (MutterWindow *self) clutter_x11_texture_pixmap_set_pixmap (CLUTTER_X11_TEXTURE_PIXMAP (priv->actor), priv->back_pixmap); + /* + * This only works *after* actually setting the pixmap, so we have to + * do it here. + * See: http://bugzilla.clutter-project.org/show_bug.cgi?id=2236 + */ + if (!clutter_glx_texture_pixmap_using_extension ( + CLUTTER_GLX_TEXTURE_PIXMAP (priv->actor))) + g_warning ("NOTE: Not using GLX TFP!\n"); g_object_get (priv->actor, "pixmap-width", &pxm_width,