seat/native: Add run impl task helper

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2777>
This commit is contained in:
Jonas Ådahl 2022-12-21 18:53:17 +01:00
parent ef64279035
commit 5a798989c4
2 changed files with 19 additions and 0 deletions

View File

@ -659,3 +659,17 @@ meta_seat_native_set_viewports (MetaSeatNative *seat,
{ {
meta_seat_impl_set_viewports (seat->impl, viewports); meta_seat_impl_set_viewports (seat->impl, viewports);
} }
void
meta_seat_native_run_impl_task (MetaSeatNative *seat,
GSourceFunc dispatch_func,
gpointer user_data,
GDestroyNotify destroy_notify)
{
g_autoptr (GTask) task = NULL;
task = g_task_new (seat->impl, NULL, NULL, NULL);
g_task_set_task_data (task, user_data, destroy_notify);
meta_seat_impl_run_input_task (seat->impl, task,
(GSourceFunc) dispatch_func);
}

View File

@ -133,4 +133,9 @@ MetaCursorRenderer * meta_seat_native_maybe_ensure_cursor_renderer (MetaSeatNati
void meta_seat_native_set_viewports (MetaSeatNative *seat, void meta_seat_native_set_viewports (MetaSeatNative *seat,
MetaViewportInfo *viewports); MetaViewportInfo *viewports);
void meta_seat_native_run_impl_task (MetaSeatNative *seat,
GSourceFunc dispatch_func,
gpointer user_data,
GDestroyNotify destroy_notify);
#endif /* META_SEAT_NATIVE_H */ #endif /* META_SEAT_NATIVE_H */