mirror of
https://github.com/brl/mutter.git
synced 2024-11-26 10:00:45 -05:00
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:
parent
afed7fde03
commit
3c5bbedb7c
@ -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
|
||||
|
@ -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 *
|
||||
|
Loading…
Reference in New Issue
Block a user