[clutter] cogl-winsys-glx: Fix the comparison in find_onscreen_for_xid



commit 66f22cfd6038c2b7cb1ff3462e9b03dc782bc302
Author: Neil Roberts <neil linux intel com>
Date:   Wed Apr 20 17:50:38 2011 +0100

    cogl-winsys-glx: Fix the comparison in find_onscreen_for_xid
    
    The comparison for finding onscreen framebuffers in
    find_onscreen_for_xid had a small thinko so that it would ignore
    framebuffers when the negation of the type is onscreen. This ends up
    doing the right thing anyway because the onscreen type has the value 0
    and the offscreen type has the value 1 but presumably it would fail if
    we ever added any other framebuffer types.

 clutter/cogl/cogl/winsys/cogl-winsys-glx.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/clutter/cogl/cogl/winsys/cogl-winsys-glx.c b/clutter/cogl/cogl/winsys/cogl-winsys-glx.c
index c8c18c0..aaa1433 100644
--- a/clutter/cogl/cogl/winsys/cogl-winsys-glx.c
+++ b/clutter/cogl/cogl/winsys/cogl-winsys-glx.c
@@ -188,7 +188,7 @@ find_onscreen_for_xid (CoglContext *context, guint32 xid)
       CoglFramebuffer *framebuffer = l->data;
       CoglOnscreenXlib *xlib_onscreen;
 
-      if (!framebuffer->type == COGL_FRAMEBUFFER_TYPE_ONSCREEN)
+      if (framebuffer->type != COGL_FRAMEBUFFER_TYPE_ONSCREEN)
         continue;
 
       /* Does the GLXEvent have the GLXDrawable or the X Window? */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]