From nobody Fri May 17 10:44:02 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1676296627585871.3339757702685; Mon, 13 Feb 2023 05:57:07 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pRZJx-0003Dh-EV; Mon, 13 Feb 2023 08:56:41 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pRSZ0-0004rh-PF for qemu-devel@nongnu.org; Mon, 13 Feb 2023 01:43:46 -0500 Received: from bg4.exmail.qq.com ([43.154.221.58]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pRSYu-0004ia-4y for qemu-devel@nongnu.org; Mon, 13 Feb 2023 01:43:43 -0500 Received: from localhost.localdomain ( [112.95.75.167]) by bizesmtp.qq.com (ESMTP) with id ; Mon, 13 Feb 2023 14:43:22 +0800 (CST) X-QQ-mid: bizesmtp89t1676270602tmjlff99 X-QQ-SSF: 0130000000800020D000B00A0000000 X-QQ-FEAT: vLOCICHxEeBxPYNh/D8cAaSdQ80UZVv2MdzEyyN7MRsNqDu7koixGq6LP6IIQ kY0/N/GCwVyPyNBioGJZnQt6G4GC0vQWbIe3D57O8F4jUgEdtLhhjr8HqrPlOwqBqPK1aef Ee4p+ZaBfrbL50b9u0GgzHlKqQHbYQfE1vhqOB5ifU+QvKf3rwbLM7cVJx2tY1QiI8Vf/l0 79CqBdfxcV2qm3CYd+9Xhy6rIyKbkG/WbEo2vRE/aAmRyhuxn87AHjxI3TUY0s80o4aqJml 7QdqSPE83SqBjBarBuHfUd2uzuB0UVxUeNzPtfU+uukOAmZvC/mbaVX7kjVeFuKTyvOMJGV cyoOI6KTX25h1kfll+KtL3yorYnBG1b6t90sILjwigEY21Qu8E= X-QQ-GoodBg: 0 From: liuyujun To: qemu-devel@nongnu.org Cc: liuyujun , Alexander Orzechowski Subject: [PATCH] This reverts commit f14aab420c58b57e07189d6d9e6d3fbfab4761a6. Date: Mon, 13 Feb 2023 14:43:13 +0800 Message-Id: <20230213064313.1171614-1-liuyujun@fingera.cn> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:fingera.cn:qybglogicsvr:qybglogicsvr4 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: none client-ip=43.154.221.58; envelope-from=liuyujun@fingera.cn; helo=bg4.exmail.qq.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Mon, 13 Feb 2023 08:56:37 -0500 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZM-MESSAGEID: 1676296629102100001 Content-Type: text/plain; charset="utf-8" This commit was originally tested on gtk/gl which corrected behavior there. Turns out, the OpenGL texture representing the virtual console was being rendered in the incorrect place and not that the cursor was incorrectly being handled. Signed-off-by: Alexander Orzechowski Signed-off-by: Yujun --- ui/gtk.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ui/gtk.c b/ui/gtk.c index 7f752d8b7d..0b4713fcd5 100644 --- a/ui/gtk.c +++ b/ui/gtk.c @@ -871,7 +871,7 @@ static gboolean gd_motion_event(GtkWidget *widget, GdkE= ventMotion *motion, int x, y; int mx, my; int fbh, fbw; - int ww, wh, ws; + int ww, wh; =20 if (!vc->gfx.ds) { return TRUE; @@ -883,7 +883,6 @@ static gboolean gd_motion_event(GtkWidget *widget, GdkE= ventMotion *motion, window =3D gtk_widget_get_window(vc->gfx.drawing_area); ww =3D gdk_window_get_width(window); wh =3D gdk_window_get_height(window); - ws =3D gdk_window_get_scale_factor(window); =20 mx =3D my =3D 0; if (ww > fbw) { @@ -893,8 +892,8 @@ static gboolean gd_motion_event(GtkWidget *widget, GdkE= ventMotion *motion, my =3D (wh - fbh) / 2; } =20 - x =3D (motion->x - mx) / vc->gfx.scale_x * ws; - y =3D (motion->y - my) / vc->gfx.scale_y * ws; + x =3D (motion->x - mx) / vc->gfx.scale_x; + y =3D (motion->y - my) / vc->gfx.scale_y; =20 if (qemu_input_is_absolute()) { if (x < 0 || y < 0 || --=20 2.20.1