compositor: Move code to sync pointer position to backends/x11

Since the backend also knows when did we start/stop being grabbed,
we can shuffle this backend-y code to the backend.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3420>
This commit is contained in:
Carlos Garnacho 2023-11-22 02:03:35 +01:00 committed by Robert Mader
parent afed7fde03
commit 3c5bbedb7c
2 changed files with 4 additions and 12 deletions

View File

@ -1934,6 +1934,8 @@ meta_seat_x11_grab (ClutterSeat *seat,
seat_x11->grab_state = state;
meta_backend_x11_sync_pointer (META_BACKEND_X11 (backend));
return state;
}
@ -1959,6 +1961,8 @@ meta_seat_x11_ungrab (ClutterSeat *seat,
}
seat_x11->grab_state = CLUTTER_GRAB_STATE_NONE;
meta_backend_x11_sync_pointer (META_BACKEND_X11 (backend));
}
static void

View File

@ -441,23 +441,11 @@ meta_compositor_x11_monotonic_to_high_res_xserver_time (MetaCompositor *composit
static void
meta_compositor_x11_grab_begin (MetaCompositor *compositor)
{
MetaDisplay *display = meta_compositor_get_display (compositor);
MetaContext *context = meta_display_get_context (display);
MetaBackend *backend = meta_context_get_backend (context);
MetaBackendX11 *backend_x11 = META_BACKEND_X11 (backend);
meta_backend_x11_sync_pointer (backend_x11);
}
static void
meta_compositor_x11_grab_end (MetaCompositor *compositor)
{
MetaDisplay *display = meta_compositor_get_display (compositor);
MetaContext *context = meta_display_get_context (display);
MetaBackend *backend = meta_context_get_backend (context);
MetaBackendX11 *backend_x11 = META_BACKEND_X11 (backend);
meta_backend_x11_sync_pointer (backend_x11);
}
static MetaCompositorView *