aboutsummaryrefslogtreecommitdiffstats
path: root/ui/gtk.c
diff options
context:
space:
mode:
authorhikalium <hikalium@hikalium.com>2024-05-12 20:14:34 +0900
committerMarc-André Lureau <marcandre.lureau@redhat.com>2024-05-14 17:14:13 +0400
commit36b8e6b4e17cb1e45c902689d1366fa93571bfbd (patch)
treea5b5d876721a13da3181d723bee2f79f0984d892 /ui/gtk.c
parentui/console: move QemuDmaBuf struct def to dmabuf.c (diff)
downloadqemu-36b8e6b4e17cb1e45c902689d1366fa93571bfbd.tar.xz
qemu-36b8e6b4e17cb1e45c902689d1366fa93571bfbd.zip
ui/gtk: Add gd_motion_event trace event
Add gd_motion_event trace event for making it easy to debug gd_motion_event related issues. Signed-off-by: hikalium <hikalium@hikalium.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20240512111435.30121-2-hikalium@hikalium.com>
Diffstat (limited to 'ui/gtk.c')
-rw-r--r--ui/gtk.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ui/gtk.c b/ui/gtk.c
index 3a6832eb1b..7ce73b0798 100644
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -915,6 +915,8 @@ static gboolean gd_motion_event(GtkWidget *widget, GdkEventMotion *motion,
x = (motion->x - mx) / vc->gfx.scale_x * ws;
y = (motion->y - my) / vc->gfx.scale_y * ws;
+ trace_gd_motion_event(ww, wh, gtk_widget_get_scale_factor(widget), x, y);
+
if (qemu_input_is_absolute(vc->gfx.dcl.con)) {
if (x < 0 || y < 0 ||
x >= surface_width(vc->gfx.ds) ||