Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.1/patches/2229382/?format=api
{ "id": 2229382, "url": "http://patchwork.ozlabs.org/api/1.1/patches/2229382/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260428081303.990973-10-marcandre.lureau@redhat.com/", "project": { "id": 14, "url": "http://patchwork.ozlabs.org/api/1.1/projects/14/?format=api", "name": "QEMU Development", "link_name": "qemu-devel", "list_id": "qemu-devel.nongnu.org", "list_email": "qemu-devel@nongnu.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20260428081303.990973-10-marcandre.lureau@redhat.com>", "date": "2026-04-28T08:12:56", "name": "[PULL,09/15] ui/console: move console_handle_touch_event() to input", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "02ad84747c0115199185ee9e3cebc57bcbd28cb9", "submitter": { "id": 66774, "url": "http://patchwork.ozlabs.org/api/1.1/people/66774/?format=api", "name": "Marc-André Lureau", "email": "marcandre.lureau@redhat.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260428081303.990973-10-marcandre.lureau@redhat.com/mbox/", "series": [ { "id": 501785, "url": "http://patchwork.ozlabs.org/api/1.1/series/501785/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=501785", "date": "2026-04-28T08:12:48", "name": "[PULL,01/15] ui: move FONT_WIDTH/HEIGHT to vgafont.h", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/501785/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2229382/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2229382/checks/", "tags": {}, "headers": { "Return-Path": "<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@legolas.ozlabs.org", "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=pass (1024-bit key;\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=aTxMEVYp;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org\n (client-ip=209.51.188.17; helo=lists1p.gnu.org;\n envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n receiver=patchwork.ozlabs.org)" ], "Received": [ "from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17])\n\t(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g4YBh0y6qz1xvV\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 28 Apr 2026 18:14:52 +1000 (AEST)", "from localhost ([::1] helo=lists1p.gnu.org)\n\tby lists1p.gnu.org with esmtp (Exim 4.90_1)\n\t(envelope-from <qemu-devel-bounces@nongnu.org>)\n\tid 1wHdaB-0006Nt-9g; Tue, 28 Apr 2026 04:14:15 -0400", "from eggs.gnu.org ([2001:470:142:3::10])\n by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <marcandre.lureau@redhat.com>)\n id 1wHda8-0006KF-TM\n for qemu-devel@nongnu.org; Tue, 28 Apr 2026 04:14:12 -0400", "from us-smtp-delivery-124.mimecast.com ([170.10.129.124])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <marcandre.lureau@redhat.com>)\n id 1wHda5-00063S-Mk\n for qemu-devel@nongnu.org; Tue, 28 Apr 2026 04:14:12 -0400", "from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com\n (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by\n relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3,\n cipher=TLS_AES_256_GCM_SHA384) id us-mta-445-Vc8-WJfoM8GBI8FyjxyHMw-1; Tue,\n 28 Apr 2026 04:14:04 -0400", "from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com\n (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n (No client certificate requested)\n by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS\n id E066C1955F0B; Tue, 28 Apr 2026 08:14:03 +0000 (UTC)", "from localhost (unknown [10.44.24.6])\n by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP\n id 879EA180047F; Tue, 28 Apr 2026 08:14:02 +0000 (UTC)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1777364048;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:content-type:content-type:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=A/mpi7G9rL8KC/F4nDYxWvV9R1JjB0TCeVbGtyXxvrU=;\n b=aTxMEVYp/y8PqpBtnlKBXDy7vHW589DSYLNMjEgmcUQ8WlOBF8MkEf5MXSsnmbS9RolzGC\n rqxkohc1w4kU4aOH73QqtYeqJiXV4WxvXHnluo7s8pmDdIhMEB5swmJxvcBIcRBX8iga30\n b81s0KYS5ypaGsBHbL+MMUEA/pHL7GU=", "X-MC-Unique": "Vc8-WJfoM8GBI8FyjxyHMw-1", "X-Mimecast-MFC-AGG-ID": "Vc8-WJfoM8GBI8FyjxyHMw_1777364044", "From": "marcandre.lureau@redhat.com", "To": "qemu-devel@nongnu.org", "Cc": "peter.maydell@linaro.org,\n =?utf-8?q?Marc-Andr=C3=A9_Lureau?= <marcandre.lureau@redhat.com>", "Subject": "[PULL 09/15] ui/console: move console_handle_touch_event() to input", "Date": "Tue, 28 Apr 2026 12:12:56 +0400", "Message-ID": "<20260428081303.990973-10-marcandre.lureau@redhat.com>", "In-Reply-To": "<20260428081303.990973-1-marcandre.lureau@redhat.com>", "References": "<20260428081303.990973-1-marcandre.lureau@redhat.com>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=UTF-8", "Content-Transfer-Encoding": "8bit", "X-Scanned-By": "MIMEDefang 3.4.1 on 10.30.177.93", "Received-SPF": "pass client-ip=170.10.129.124;\n envelope-from=marcandre.lureau@redhat.com;\n helo=us-smtp-delivery-124.mimecast.com", "X-Spam_score_int": "-20", "X-Spam_score": "-2.1", "X-Spam_bar": "--", "X-Spam_report": "(-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001,\n DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,\n RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001,\n SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no", "X-Spam_action": "no action", "X-BeenThere": "qemu-devel@nongnu.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "qemu development <qemu-devel.nongnu.org>", "List-Unsubscribe": "<https://lists.nongnu.org/mailman/options/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>", "List-Archive": "<https://lists.nongnu.org/archive/html/qemu-devel>", "List-Post": "<mailto:qemu-devel@nongnu.org>", "List-Help": "<mailto:qemu-devel-request@nongnu.org?subject=help>", "List-Subscribe": "<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=subscribe>", "Errors-To": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org", "Sender": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org" }, "content": "From: Marc-André Lureau <marcandre.lureau@redhat.com>\n\nThe function uses input.c functions to provide a simpler abstraction for\ntouch events. Let's move it from the already overloaded console.c, and\nto avoid some unnecessary dependency from console.c on input.c.\n\nReviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>\nSigned-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>\n---\n include/ui/console.h | 14 ----------\n include/ui/input.h | 15 ++++++++++\n ui/console.c | 65 --------------------------------------------\n ui/dbus-console.c | 6 ++--\n ui/gtk.c | 8 +++---\n ui/input.c | 65 ++++++++++++++++++++++++++++++++++++++++++++\n 6 files changed, 87 insertions(+), 86 deletions(-)", "diff": "diff --git a/include/ui/console.h b/include/ui/console.h\nindex 0bc9e544fad..27eacc39cc0 100644\n--- a/include/ui/console.h\n+++ b/include/ui/console.h\n@@ -111,20 +111,6 @@ void qemu_text_console_put_keysym(QemuTextConsole *s, int keysym);\n bool qemu_text_console_put_qcode(QemuTextConsole *s, int qcode, bool ctrl);\n void qemu_text_console_put_string(QemuTextConsole *s, const char *str, int len);\n \n-/* Touch devices */\n-typedef struct touch_slot {\n- int x;\n- int y;\n- int tracking_id;\n-} touch_slot;\n-\n-void console_handle_touch_event(QemuConsole *con,\n- struct touch_slot touch_slots[INPUT_EVENT_SLOTS_MAX],\n- uint64_t num_slot,\n- int width, int height,\n- double x, double y,\n- InputMultiTouchType type,\n- Error **errp);\n /* consoles */\n \n struct QemuConsoleClass {\ndiff --git a/include/ui/input.h b/include/ui/input.h\nindex 8f9aac562ed..52c164bde57 100644\n--- a/include/ui/input.h\n+++ b/include/ui/input.h\n@@ -70,6 +70,21 @@ void qemu_input_queue_mtt_abs(QemuConsole *src, InputAxis axis, int value,\n int min_in, int max_in,\n int slot, int tracking_id);\n \n+/* Touch devices */\n+typedef struct touch_slot {\n+ int x;\n+ int y;\n+ int tracking_id;\n+} touch_slot;\n+\n+void qemu_input_touch_event(QemuConsole *con,\n+ struct touch_slot touch_slots[INPUT_EVENT_SLOTS_MAX],\n+ uint64_t num_slot,\n+ int width, int height,\n+ double x, double y,\n+ InputMultiTouchType type,\n+ Error **errp);\n+\n void qemu_input_check_mode_change(void);\n void qemu_add_mouse_mode_change_notifier(Notifier *notify);\n void qemu_remove_mouse_mode_change_notifier(Notifier *notify);\ndiff --git a/ui/console.c b/ui/console.c\nindex a608c29b843..799d61ec1a5 100644\n--- a/ui/console.c\n+++ b/ui/console.c\n@@ -548,71 +548,6 @@ static bool console_compatible_with(QemuConsole *con,\n return true;\n }\n \n-void console_handle_touch_event(QemuConsole *con,\n- struct touch_slot touch_slots[INPUT_EVENT_SLOTS_MAX],\n- uint64_t num_slot,\n- int width, int height,\n- double x, double y,\n- InputMultiTouchType type,\n- Error **errp)\n-{\n- struct touch_slot *slot;\n- bool needs_sync = false;\n- int update;\n- int i;\n-\n- if (num_slot >= INPUT_EVENT_SLOTS_MAX) {\n- error_setg(errp,\n- \"Unexpected touch slot number: % \" PRId64\" >= %d\",\n- num_slot, INPUT_EVENT_SLOTS_MAX);\n- return;\n- }\n-\n- slot = &touch_slots[num_slot];\n- slot->x = x;\n- slot->y = y;\n-\n- if (type == INPUT_MULTI_TOUCH_TYPE_BEGIN) {\n- slot->tracking_id = num_slot;\n- }\n-\n- for (i = 0; i < INPUT_EVENT_SLOTS_MAX; ++i) {\n- if (i == num_slot) {\n- update = type;\n- } else {\n- update = INPUT_MULTI_TOUCH_TYPE_UPDATE;\n- }\n-\n- slot = &touch_slots[i];\n-\n- if (slot->tracking_id == -1) {\n- continue;\n- }\n-\n- if (update == INPUT_MULTI_TOUCH_TYPE_END) {\n- slot->tracking_id = -1;\n- qemu_input_queue_mtt(con, update, i, slot->tracking_id);\n- needs_sync = true;\n- } else {\n- qemu_input_queue_mtt(con, update, i, slot->tracking_id);\n- qemu_input_queue_btn(con, INPUT_BUTTON_TOUCH, true);\n- qemu_input_queue_mtt_abs(con,\n- INPUT_AXIS_X, (int) slot->x,\n- 0, width,\n- i, slot->tracking_id);\n- qemu_input_queue_mtt_abs(con,\n- INPUT_AXIS_Y, (int) slot->y,\n- 0, height,\n- i, slot->tracking_id);\n- needs_sync = true;\n- }\n- }\n-\n- if (needs_sync) {\n- qemu_input_event_sync();\n- }\n-}\n-\n void qemu_console_set_display_gl_ctx(QemuConsole *con, DisplayGLCtx *gl)\n {\n /* display has opengl support */\ndiff --git a/ui/dbus-console.c b/ui/dbus-console.c\nindex 85e215ef233..564f004bd86 100644\n--- a/ui/dbus-console.c\n+++ b/ui/dbus-console.c\n@@ -424,9 +424,9 @@ dbus_touch_send_event(DBusDisplayConsole *ddc,\n width = qemu_console_get_width(ddc->dcl.con, 0);\n height = qemu_console_get_height(ddc->dcl.con, 0);\n \n- console_handle_touch_event(ddc->dcl.con, touch_slots,\n- num_slot, width, height,\n- x, y, kind, &error);\n+ qemu_input_touch_event(ddc->dcl.con, touch_slots,\n+ num_slot, width, height,\n+ x, y, kind, &error);\n if (error != NULL) {\n g_dbus_method_invocation_return_error(\n invocation, DBUS_DISPLAY_ERROR,\ndiff --git a/ui/gtk.c b/ui/gtk.c\nindex 9ebe7e8df0d..8fd39c90c29 100644\n--- a/ui/gtk.c\n+++ b/ui/gtk.c\n@@ -1201,10 +1201,10 @@ static gboolean gd_touch_event(GtkWidget *widget, GdkEventTouch *touch,\n return FALSE;\n }\n \n- console_handle_touch_event(vc->gfx.dcl.con, touch_slots,\n- num_slot, surface_width(vc->gfx.ds),\n- surface_height(vc->gfx.ds), touch->x,\n- touch->y, type, &err);\n+ qemu_input_touch_event(vc->gfx.dcl.con, touch_slots,\n+ num_slot, surface_width(vc->gfx.ds),\n+ surface_height(vc->gfx.ds), touch->x,\n+ touch->y, type, &err);\n if (err) {\n warn_report_err(err);\n }\ndiff --git a/ui/input.c b/ui/input.c\nindex 147e69c1c3c..57e7817878a 100644\n--- a/ui/input.c\n+++ b/ui/input.c\n@@ -609,3 +609,68 @@ bool qemu_mouse_set(int index, Error **errp)\n notifier_list_notify(&mouse_mode_notifiers, NULL);\n return true;\n }\n+\n+void qemu_input_touch_event(QemuConsole *con,\n+ struct touch_slot touch_slots[INPUT_EVENT_SLOTS_MAX],\n+ uint64_t num_slot,\n+ int width, int height,\n+ double x, double y,\n+ InputMultiTouchType type,\n+ Error **errp)\n+{\n+ struct touch_slot *slot;\n+ bool needs_sync = false;\n+ int update;\n+ int i;\n+\n+ if (num_slot >= INPUT_EVENT_SLOTS_MAX) {\n+ error_setg(errp,\n+ \"Unexpected touch slot number: % \" PRId64\" >= %d\",\n+ num_slot, INPUT_EVENT_SLOTS_MAX);\n+ return;\n+ }\n+\n+ slot = &touch_slots[num_slot];\n+ slot->x = x;\n+ slot->y = y;\n+\n+ if (type == INPUT_MULTI_TOUCH_TYPE_BEGIN) {\n+ slot->tracking_id = num_slot;\n+ }\n+\n+ for (i = 0; i < INPUT_EVENT_SLOTS_MAX; ++i) {\n+ if (i == num_slot) {\n+ update = type;\n+ } else {\n+ update = INPUT_MULTI_TOUCH_TYPE_UPDATE;\n+ }\n+\n+ slot = &touch_slots[i];\n+\n+ if (slot->tracking_id == -1) {\n+ continue;\n+ }\n+\n+ if (update == INPUT_MULTI_TOUCH_TYPE_END) {\n+ slot->tracking_id = -1;\n+ qemu_input_queue_mtt(con, update, i, slot->tracking_id);\n+ needs_sync = true;\n+ } else {\n+ qemu_input_queue_mtt(con, update, i, slot->tracking_id);\n+ qemu_input_queue_btn(con, INPUT_BUTTON_TOUCH, true);\n+ qemu_input_queue_mtt_abs(con,\n+ INPUT_AXIS_X, (int) slot->x,\n+ 0, width,\n+ i, slot->tracking_id);\n+ qemu_input_queue_mtt_abs(con,\n+ INPUT_AXIS_Y, (int) slot->y,\n+ 0, height,\n+ i, slot->tracking_id);\n+ needs_sync = true;\n+ }\n+ }\n+\n+ if (needs_sync) {\n+ qemu_input_event_sync();\n+ }\n+}\n", "prefixes": [ "PULL", "09/15" ] }