mirror of
https://github.com/brl/mutter.git
synced 2024-11-13 01:36:10 -05:00
wayland: Use a stage paint callback instead of a signal handler on "paint"
This is much more appropriate...
This commit is contained in:
parent
2746608eb2
commit
0924c7d61b
@ -637,6 +637,8 @@ after_stage_paint (ClutterStage *stage,
|
||||
|
||||
for (l = info->windows; l; l = l->next)
|
||||
meta_window_actor_post_paint (l->data);
|
||||
|
||||
meta_wayland_compositor_paint_finished (meta_wayland_compositor_get_default ());
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -109,5 +109,6 @@ void meta_wayland_buffer_reference (MetaWaylandBuff
|
||||
|
||||
void meta_wayland_compositor_update (MetaWaylandCompositor *compositor,
|
||||
const ClutterEvent *event);
|
||||
void meta_wayland_compositor_paint_finished (MetaWaylandCompositor *compositor);
|
||||
|
||||
#endif /* META_WAYLAND_PRIVATE_H */
|
||||
|
@ -500,11 +500,9 @@ const static struct wl_compositor_interface meta_wayland_compositor_interface =
|
||||
meta_wayland_compositor_create_region
|
||||
};
|
||||
|
||||
static void
|
||||
paint_finished_cb (ClutterActor *self, void *user_data)
|
||||
void
|
||||
meta_wayland_compositor_paint_finished (MetaWaylandCompositor *compositor)
|
||||
{
|
||||
MetaWaylandCompositor *compositor = user_data;
|
||||
|
||||
while (!wl_list_empty (&compositor->frame_callbacks))
|
||||
{
|
||||
MetaWaylandFrameCallback *callback =
|
||||
@ -711,8 +709,6 @@ meta_wayland_init (void)
|
||||
compositor->outputs = meta_wayland_compositor_update_outputs (compositor, monitors);
|
||||
|
||||
compositor->stage = meta_wayland_stage_new ();
|
||||
g_signal_connect_after (compositor->stage, "paint",
|
||||
G_CALLBACK (paint_finished_cb), compositor);
|
||||
g_signal_connect (compositor->stage, "destroy",
|
||||
G_CALLBACK (stage_destroy_cb), NULL);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user