From 008693d8b22640a95db897d028595ec87d3ad212 Mon Sep 17 00:00:00 2001 From: Neil Roberts Date: Mon, 8 Dec 2008 12:02:36 +0000 Subject: [PATCH] * clutter/clutter-main.c (_clutter_do_pick): Restore the GL_DITHER state after reading the pixel value instead of before. Suggested in bug 1328 thanks to Guy Zadickario. --- ChangeLog | 6 ++++++ clutter/clutter-main.c | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 21897d0af..5de0a1142 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-12-08 Neil Roberts + + * clutter/clutter-main.c (_clutter_do_pick): Restore the GL_DITHER + state after reading the pixel value instead of before. Suggested + in bug 1328 thanks to Guy Zadickario. + 2008-12-05 Emmanuele Bassi Bug 1309 - clutter_timeline_new and clutter_timeline_set_speed diff --git a/clutter/clutter-main.c b/clutter/clutter-main.c index f77f3313e..9edbce8c6 100644 --- a/clutter/clutter-main.c +++ b/clutter/clutter-main.c @@ -386,13 +386,13 @@ _clutter_do_pick (ClutterStage *stage, */ glFinish(); + /* Read the color of the screen co-ords pixel */ + glReadPixels (x, viewport[3] - y -1, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, pixel); + /* Restore whether GL_DITHER was enabled */ if (dither_was_on) glEnable (GL_DITHER); - /* Read the color of the screen co-ords pixel */ - glReadPixels (x, viewport[3] - y -1, 1, 1, GL_RGBA, GL_UNSIGNED_BYTE, pixel); - if (pixel[0] == 0xff && pixel[1] == 0xff && pixel[2] == 0xff) return CLUTTER_ACTOR (stage);