Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.1/patches/2222126/?format=api
{ "id": 2222126, "url": "http://patchwork.ozlabs.org/api/1.1/patches/2222126/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260410-qemu-vnc-v2-61-231416f76dc3@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": "<20260410-qemu-vnc-v2-61-231416f76dc3@redhat.com>", "date": "2026-04-10T19:19:23", "name": "[v2,61/67] 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/20260410-qemu-vnc-v2-61-231416f76dc3@redhat.com/mbox/", "series": [ { "id": 499494, "url": "http://patchwork.ozlabs.org/api/1.1/series/499494/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=499494", "date": "2026-04-10T19:18:23", "name": "ui: add standalone VNC server over D-Bus", "version": 2, "mbox": "http://patchwork.ozlabs.org/series/499494/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2222126/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2222126/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=cA8WlCSg;\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=lists.gnu.org;\n envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n receiver=patchwork.ozlabs.org)" ], "Received": [ "from lists.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 4fsmzM1W41z20HV\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 11 Apr 2026 05:27:43 +1000 (AEST)", "from localhost ([::1] helo=lists1p.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.90_1)\n\t(envelope-from <qemu-devel-bounces@nongnu.org>)\n\tid 1wBHTu-0007lt-CW; Fri, 10 Apr 2026 15:25:30 -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 1wBHTe-0007SM-Gl\n for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:25:15 -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 1wBHTU-0002ko-5i\n for qemu-devel@nongnu.org; Fri, 10 Apr 2026 15:25:11 -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-581-ZxC_VHCkNGWNLo1W7-RLXQ-1; Fri,\n 10 Apr 2026 15:25:00 -0400", "from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com\n (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17])\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 D308519560AF; Fri, 10 Apr 2026 19:24:59 +0000 (UTC)", "from localhost (unknown [10.44.22.4])\n by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP\n id 84B36195608E; Fri, 10 Apr 2026 19:24:57 +0000 (UTC)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1775849102;\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=V8Kmb9hMdDfZvIwjrajmdDx/fPyIjOHyNIBxjOd4ZLI=;\n b=cA8WlCSgUVl64gDRLFOGlfbPe6W3T7c2vwUNbDQTuNQInQEcY8yb+vFFV5k+d3hkegFkci\n vBjOqyiaal5bzO56UwP15+eLqlGu70SCo5GgMuDwtyE38UQUOSqyttJ7tKlPNv5hOwl/CN\n bM7/NDXvfkMPxtUWx2Bz3s3x4hOXaes=", "X-MC-Unique": "ZxC_VHCkNGWNLo1W7-RLXQ-1", "X-Mimecast-MFC-AGG-ID": "ZxC_VHCkNGWNLo1W7-RLXQ_1775849099", "From": "=?utf-8?q?Marc-Andr=C3=A9_Lureau?= <marcandre.lureau@redhat.com>", "Date": "Fri, 10 Apr 2026 23:19:23 +0400", "Subject": "[PATCH v2 61/67] ui/console: move console_handle_touch_event() to\n input", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"utf-8\"", "Content-Transfer-Encoding": "8bit", "Message-Id": "<20260410-qemu-vnc-v2-61-231416f76dc3@redhat.com>", "References": "<20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com>", "In-Reply-To": "<20260410-qemu-vnc-v2-0-231416f76dc3@redhat.com>", "To": "qemu-devel@nongnu.org", "Cc": "=?utf-8?q?Marc-Andr=C3=A9_Lureau?= <marcandre.lureau@redhat.com>,\n\t=?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@linaro.org>", "X-Developer-Signature": "v=1; a=openpgp-sha256; l=9221;\n i=marcandre.lureau@redhat.com; h=from:subject:message-id;\n bh=689gCTcA3cL/UQbDpjNhlr4RASF6v9cOEQL32KHP834=;\n b=owEBbQKS/ZANAwAKAdro4Ql1lpzlAcsmYgBp2U0XkcIryQX8g+qHkJPqbffhSD/jlVaay0MjE\n eZ7ZQeVlpeJAjMEAAEKAB0WIQSHqb2TP4fGBtJ29i3a6OEJdZac5QUCadlNFwAKCRDa6OEJdZac\n 5X1jD/0WZRSWLmkpZ6hej+chrFt+yD4NL5k5ToCo56CrOjVxpWit+KmduGXkikF6JZfpkmcbdlm\n ggSM+P9Bl4va1c9NeIK1af3MI0i/Odk0MvadNnF8h6scN4PJXpf4uspQrZKABeBgwn5tXSsAdQ/\n k7Y+P+xvn87OI6iph8R6XhoVWzqxhDRuIyE2U6QzCXN+aH7/AfWJd5uRpMrXySLXb8P0HY2DgJT\n Nhysnh1YwwVlXEnN8BtNqQGdWm3xJfmoerMVnFm0PdGsvt/bJ3/YuDpaACDadUma/6bwOHEzQHS\n uiXTW9HWQb0wO2a6hYSMIqMsQTh6bbEAfg89imonc8jzxWz7nyMcNNMoIFu4PiLitPRapwryIa0\n vXmTChZ5pRo2raepGHoIbeVynrQYFp0DXbtmpAnxHx0fvzVphqIqK31k0d0zcqx/WDrQ0mFQ4Ze\n Plxi8jDUt2fFIkkmr4ff9XLUkYt/EOaiC2ry4eYNyDvF5zEhwolSC6tIRyj4kOiTjrPQL/qLqnl\n bq5QxugRy1oIB5UbU0swrvxB0h0PmrOc+p8HHlXcevym5pRXVVt33kRvUkpt4ANGPat6iSqrX+T\n XPVSvR07uhoao9Y26ZmGvYGqaGQtryjN1XrbjRrwJG+A+cprsjPtJ9nSOI7hO9oKTGm6YQ1aiBB\n D4wqBEqhMVCozIg==", "X-Developer-Key": "i=marcandre.lureau@redhat.com; a=openpgp;\n fpr=87A9BD933F87C606D276F62DDAE8E10975969CE5", "X-Scanned-By": "MIMEDefang 3.0 on 10.30.177.17", "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": "7", "X-Spam_score": "0.7", "X-Spam_bar": "/", "X-Spam_report": "(0.7 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.54,\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 RCVD_IN_SBL_CSS=3.335, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001,\n RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001,\n SPF_PASS=-0.001 autolearn=no 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": "The 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 5566d1f65f9..89a93230bb0 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 344bf308b0c..405dd1bb5b8 100644\n--- a/ui/console.c\n+++ b/ui/console.c\n@@ -550,71 +550,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 88f58e88efb..b8e5c57b148 100644\n--- a/ui/dbus-console.c\n+++ b/ui/dbus-console.c\n@@ -423,9 +423,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 bcb67db7ee7..3b84224d8e8 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": [ "v2", "61/67" ] }