summary refs log tree commit diff stats
path: root/ui/sdl2.c
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2023-03-20 17:26:24 +0400
committerMarc-André Lureau <marcandre.lureau@redhat.com>2023-03-21 11:17:01 +0400
commit281a77df28bdea2b4c475a26d4c2d92b2d931af9 (patch)
treed9153a112e1f285cf5d6d64362461eb71722a03d /ui/sdl2.c
parent74bc00c6b9065e34f04000a06c89cd04a814a599 (diff)
downloadfocaccia-qemu-281a77df28bdea2b4c475a26d4c2d92b2d931af9.tar.gz
focaccia-qemu-281a77df28bdea2b4c475a26d4c2d92b2d931af9.zip
ui/gtk: fix cursor moved to left corner
Do not attempt to move the pointer if the widget is not yet realized.
The mouse cursor is placed to the corner of the screen, on X11 at least,
as x_root and y_root are then miscalculated. (this is not reproducible
on Wayland, because Gtk doesn't implement device warping there)

This also fixes the following warning at start:
qemu: Gdk: gdk_window_get_root_coords: assertion 'GDK_IS_WINDOW (window)' failed

Fixes: 6effaa16ac98 ("ui: set cursor position upon listener
registration")
Reported-by: Bernhard Beschow <shentey@gmail.com>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Tested-by: Bernhard Beschow <shentey@gmail.com>
Message-Id: <20230320132624.1612464-1-marcandre.lureau@redhat.com>
Diffstat (limited to 'ui/sdl2.c')
0 files changed, 0 insertions, 0 deletions