Always queue MetaLater via compositor instance
The "later" API is used to queue actions in relation to compositing, thus is owned by the MetaCompositor instance. Make users of this functionality get MetaLaters instance from the compositor, and stop using the global meta_later() API. display: Use non-singleton MetaLater API tests: Use non-singleton MetaLater API meta/common: Make docs refer to context aware MetaLater API Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2718>
This commit is contained in:

committed by
Robert Mader

parent
342c94076d
commit
f8376a43d3
@ -8338,13 +8338,16 @@ quit_main_loop (gpointer data)
|
||||
static void
|
||||
dispatch (void)
|
||||
{
|
||||
MetaDisplay *display = meta_context_get_display (test_context);
|
||||
MetaCompositor *compositor = meta_display_get_compositor (display);
|
||||
MetaLaters *laters = meta_compositor_get_laters (compositor);
|
||||
GMainLoop *loop;
|
||||
|
||||
loop = g_main_loop_new (NULL, FALSE);
|
||||
meta_later_add (META_LATER_BEFORE_REDRAW,
|
||||
quit_main_loop,
|
||||
loop,
|
||||
NULL);
|
||||
meta_laters_add (laters, META_LATER_BEFORE_REDRAW,
|
||||
quit_main_loop,
|
||||
loop,
|
||||
NULL);
|
||||
g_main_loop_run (loop);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user