From 071719ffa4dd7e604c05d56f1739500440f91686 Mon Sep 17 00:00:00 2001 From: Matthew Allum Date: Mon, 9 Jul 2007 22:59:52 +0000 Subject: [PATCH] 2007-07-09 Matthew Allum * TODO: Updates. * clutter/clutter-stage.c: * clutter/glx/clutter-stage-glx.c: Fix cursor visibility property. Force a repaint before mapping to attempt to avoid flicker. --- ChangeLog | 9 +++++++++ TODO | 9 ++++++++- clutter/clutter-stage.c | 6 +++--- clutter/glx/clutter-stage-glx.c | 12 ++++++++++-- 4 files changed, 30 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index a8b749abc..843f1f3c8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2007-07-09 Matthew Allum + + * TODO: + Updates. + * clutter/clutter-stage.c: + * clutter/glx/clutter-stage-glx.c: + Fix cursor visibility property. + Force a repaint before mapping to attempt to avoid flicker. + 2007-07-09 Richard Purdie * clutter/eglnative/clutter-event-egl.c: diff --git a/TODO b/TODO index 2f9c5dafc..783f6e825 100644 --- a/TODO +++ b/TODO @@ -33,16 +33,23 @@ Maybe: Definetly: - More ClutterUnits support, convert actor API to units. - - Device independant units - Fragment shader support infrastructure - XML/JSON type 'layout' files - include actors + behaviours + timeline etc. - App developers manual. + - Events for Actors + - Add 'sensitive' property, false by default. Only pick sensitive actors + - Very simple focus model - actors have a focus flag and if set emit + key events. + - Motion events need to be explicitly enabled. Nice/Maybe: +=========== - Gradient support ? - Rectangle like props to all actors - Glitz integration - Some kind of focus model. - Apple/Win native backends. + - ClutterBehaviourDepth (trivial) + - ClutterTextureAnimation (trivial) - Glitz backend over GLX (would cover above) \ No newline at end of file diff --git a/clutter/clutter-stage.c b/clutter/clutter-stage.c index b17ba0a8c..480001821 100644 --- a/clutter/clutter-stage.c +++ b/clutter/clutter-stage.c @@ -243,7 +243,7 @@ clutter_stage_class_init (ClutterStageClass *klass) g_param_spec_boolean ("cursor-visible", "Cursor Visible", "Whether the mouse pointer is visible on the main stage ", - FALSE, + TRUE, G_PARAM_CONSTRUCT | CLUTTER_PARAM_READWRITE)); g_object_class_install_property @@ -423,7 +423,7 @@ clutter_stage_init (ClutterStage *self) priv->is_offscreen = FALSE; priv->is_fullscreen = FALSE; - priv->is_cursor_visible = FALSE; + priv->is_cursor_visible = TRUE; priv->color.red = 0xff; priv->color.green = 0xff; @@ -723,7 +723,7 @@ clutter_stage_hide_cursor (ClutterStage *stage) priv->is_cursor_visible = FALSE; if (CLUTTER_STAGE_GET_CLASS (stage)->set_cursor_visible) - CLUTTER_STAGE_GET_CLASS (stage)->set_cursor_visible (stage, FALSE); + CLUTTER_STAGE_GET_CLASS (stage)->set_cursor_visible (stage, FALSE); g_object_notify (G_OBJECT (stage), "cursor-visible"); } diff --git a/clutter/glx/clutter-stage-glx.c b/clutter/glx/clutter-stage-glx.c index 798e3afbb..c1eb31704 100644 --- a/clutter/glx/clutter-stage-glx.c +++ b/clutter/glx/clutter-stage-glx.c @@ -56,7 +56,14 @@ clutter_stage_glx_show (ClutterActor *actor) ClutterStageGLX *stage_glx = CLUTTER_STAGE_GLX (actor); if (stage_glx->xwin) - XMapWindow (stage_glx->xdpy, stage_glx->xwin); + { + /* Fire off a redraw to avoid flicker on first map. + * Appears not to work perfectly on intel drivers at least. + */ + clutter_redraw(); + XSync (stage_glx->xdpy, FALSE); + XMapWindow (stage_glx->xdpy, stage_glx->xwin); + } } static void @@ -112,6 +119,7 @@ clutter_stage_glx_unrealize (ClutterActor *actor) stage_glx->gl_context = None; } + XSync (stage_glx->xdpy, False); clutter_glx_untrap_x_errors (); } @@ -413,7 +421,7 @@ clutter_stage_glx_set_cursor_visible (ClutterStage *stage, if (stage_glx->xwin == None) return; - CLUTTER_NOTE (MISC, "setting cursor state ('%s') over stage window (%u)", + CLUTTER_NOTE (BACKEND, "setting cursor state ('%s') over stage window (%u)", show_cursor ? "visible" : "invisible", (unsigned int) stage_glx->xwin);