backend: Initialize cursor renderer position too

This means initializing the pointer position in MetaSeatImpl
synchronously too, otherwise it's not guaranteed querying the seat state
will result in the expected position.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3071>
This commit is contained in:
Jonas Ådahl
2023-06-13 00:39:08 +02:00
committed by Marge Bot
parent 0b0f863428
commit 63767df59a
2 changed files with 36 additions and 11 deletions

View File

@ -271,6 +271,7 @@ init_pointer_position (MetaBackend *backend)
{
MetaBackendPrivate *priv = meta_backend_get_instance_private (backend);
MetaMonitorManager *monitor_manager = priv->monitor_manager;
MetaCursorRenderer *cursor_renderer;
ClutterSeat *seat = priv->default_seat;
MetaLogicalMonitor *primary;
@ -282,6 +283,9 @@ init_pointer_position (MetaBackend *backend)
clutter_seat_init_pointer_position (seat,
primary->rect.x + primary->rect.width * 0.9,
primary->rect.y + primary->rect.height * 0.9);
cursor_renderer = meta_backend_get_cursor_renderer (backend);
meta_cursor_renderer_update_position (cursor_renderer);
}
static gboolean