mirror of
https://github.com/brl/mutter.git
synced 2025-06-26 15:07:05 +00:00
[repaint] Run the repaint functions in clutter_redraw()
The clutter_redraw() function is used by libraries embedding Clutter inside another toolkit, instead of queueing a redraw on the embedded stage. This means that clutter_redraw() should perform the same sequence of actions done by the redraw idle callback.
This commit is contained in:
@ -174,14 +174,8 @@ _clutter_stage_maybe_setup_viewport (ClutterStage *stage)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_redraw:
|
||||
*
|
||||
* Forces a redraw of the entire stage. Applications should never use this
|
||||
* function, but queue a redraw using clutter_actor_queue_redraw().
|
||||
*/
|
||||
void
|
||||
clutter_redraw (ClutterStage *stage)
|
||||
_clutter_do_redraw (ClutterStage *stage)
|
||||
{
|
||||
ClutterMainContext *ctx;
|
||||
ClutterMasterClock *master_clock;
|
||||
@ -235,6 +229,32 @@ clutter_redraw (ClutterStage *stage)
|
||||
CLUTTER_TIMESTAMP (SCHEDULER, "Redraw finish for stage:%p", stage);
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_redraw:
|
||||
*
|
||||
* Forces a redraw of the entire stage. Applications should never use this
|
||||
* function, but queue a redraw using clutter_actor_queue_redraw().
|
||||
*
|
||||
* This function should only be used by libraries integrating Clutter from
|
||||
* within another toolkit.
|
||||
*/
|
||||
void
|
||||
clutter_redraw (ClutterStage *stage)
|
||||
{
|
||||
ClutterMasterClock *master_clock;
|
||||
|
||||
/* we need to do this because the clutter_redraw() might be called by
|
||||
* clutter-gtk, and this will not cause the master clock to advance nor
|
||||
* the repaint functions to be run
|
||||
*/
|
||||
master_clock = _clutter_master_clock_get_default ();
|
||||
_clutter_master_clock_advance (master_clock);
|
||||
|
||||
_clutter_run_repaint_functions ();
|
||||
|
||||
_clutter_do_redraw (stage);
|
||||
}
|
||||
|
||||
/**
|
||||
* clutter_set_motion_events_enabled:
|
||||
* @enable: %TRUE to enable per-actor motion events
|
||||
|
Reference in New Issue
Block a user