From dcd23dc22026630edcf702c4060042c15a85c2f7 Mon Sep 17 00:00:00 2001 From: Neil Roberts Date: Wed, 20 Apr 2011 17:50:38 +0100 Subject: [PATCH] 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. --- cogl/winsys/cogl-winsys-glx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cogl/winsys/cogl-winsys-glx.c b/cogl/winsys/cogl-winsys-glx.c index c8c18c005..aaa1433d6 100644 --- a/cogl/winsys/cogl-winsys-glx.c +++ b/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? */