From 6022344a800da28f1cffcc92ba24f7a5b8b36826 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Tue, 13 May 2008 10:21:25 +0000 Subject: [PATCH] 2008-05-13 Emmanuele Bassi * clutter/x11/clutter-event-x11.c (event_translate): Remove the cheap Expose event compression, as it seems to play games when a composite manager is running. It's also not really needed, as the redraw queue will avoid redraws too close to each other anyway. * clutter/x11/clutter-stage-x11.c: (clutter_stage_x11_show), (clutter_stage_x11_hide): Do not chain up just to set the flags. This fixes a critical warning coming from ClutterActor::hide() default implementation. --- ChangeLog | 13 +++++++++++++ clutter/x11/clutter-event-x11.c | 15 ++------------- clutter/x11/clutter-stage-x11.c | 8 +++----- 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2acbab3c2..e80eb636b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2008-05-13 Emmanuele Bassi + + * clutter/x11/clutter-event-x11.c (event_translate): Remove the + cheap Expose event compression, as it seems to play games when a + composite manager is running. It's also not really needed, as + the redraw queue will avoid redraws too close to each other + anyway. + + * clutter/x11/clutter-stage-x11.c: + (clutter_stage_x11_show), (clutter_stage_x11_hide): Do not chain + up just to set the flags. This fixes a critical warning coming + from ClutterActor::hide() default implementation. + 2008-05-13 Ivan Leben * clutter/cogl/gl/cogl-defines.h.in: diff --git a/clutter/x11/clutter-event-x11.c b/clutter/x11/clutter-event-x11.c index 32a562df8..0315dbc70 100644 --- a/clutter/x11/clutter-event-x11.c +++ b/clutter/x11/clutter-event-x11.c @@ -502,19 +502,8 @@ event_translate (ClutterBackend *backend, case Expose: { - XEvent foo_xev; - - /* Cheap compress */ - while (XCheckTypedWindowEvent (backend_x11->xdpy, - xevent->xexpose.window, - Expose, - &foo_xev)); - - /* FIXME: need to make stage an 'actor' so can que - * a paint direct from there rather than hack here... - */ - CLUTTER_NOTE (MULTISTAGE, "expose for stage:%p, redrawing", stage); - clutter_redraw (stage); + CLUTTER_NOTE (MULTISTAGE, "expose for stage: %p, redrawing", stage); + clutter_actor_queue_redraw (CLUTTER_ACTOR (stage)); res = FALSE; } break; diff --git a/clutter/x11/clutter-stage-x11.c b/clutter/x11/clutter-stage-x11.c index e323b4b36..27aeb40b4 100644 --- a/clutter/x11/clutter-stage-x11.c +++ b/clutter/x11/clutter-stage-x11.c @@ -128,8 +128,7 @@ clutter_stage_x11_show (ClutterActor *actor) XMapWindow (stage_x11->xdpy, stage_x11->xwin); } - /* chain up */ - CLUTTER_ACTOR_CLASS (clutter_stage_x11_parent_class)->show (actor); + CLUTTER_ACTOR_SET_FLAGS (actor, CLUTTER_ACTOR_MAPPED); } static void @@ -137,11 +136,10 @@ clutter_stage_x11_hide (ClutterActor *actor) { ClutterStageX11 *stage_x11 = CLUTTER_STAGE_X11 (actor); + CLUTTER_ACTOR_UNSET_FLAGS (actor, CLUTTER_ACTOR_MAPPED); + if (stage_x11->xwin) XUnmapWindow (stage_x11->xdpy, stage_x11->xwin); - - /* chain up */ - CLUTTER_ACTOR_CLASS (clutter_stage_x11_parent_class)->hide (actor); } void