[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 1/6] ui/gtk: Ignore 2- and 3-button press events
From: |
Gerd Hoffmann |
Subject: |
[PULL 1/6] ui/gtk: Ignore 2- and 3-button press events |
Date: |
Fri, 18 Mar 2022 14:56:29 +0100 |
From: "K. Lange" <klange@toaruos.org>
GTK already produces corresponding GDK_BUTTON_PRESS events
alongside 2BUTTON and 3BUTTON_PRESS events. The 2BUTTON and
3BUTTON_PRESS events were incorrectly being interpreted and
passed to guests as button release events.
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/558
Signed-off-by: K. Lange <klange@toaruos.org>
Message-Id: <20220305104521.3583703-1-klange@toaruos.org>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
ui/gtk.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/ui/gtk.c b/ui/gtk.c
index 1b24a67d7964..c57c36749e0e 100644
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -972,6 +972,10 @@ static gboolean gd_button_event(GtkWidget *widget,
GdkEventButton *button,
return TRUE;
}
+ if (button->type == GDK_2BUTTON_PRESS || button->type ==
GDK_3BUTTON_PRESS) {
+ return TRUE;
+ }
+
qemu_input_queue_btn(vc->gfx.dcl.con, btn,
button->type == GDK_BUTTON_PRESS);
qemu_input_event_sync();
--
2.35.1
- [PULL 0/6] Fixes 20220318 patches, Gerd Hoffmann, 2022/03/18
- [PULL 1/6] ui/gtk: Ignore 2- and 3-button press events,
Gerd Hoffmann <=
- [PULL 2/6] ui: avoid unnecessary memory operations in vnc_refresh_server_surface(), Gerd Hoffmann, 2022/03/18
- [PULL 4/6] hw/display/cirrus_vga: Clean up indentation in pci_cirrus_vga_realize(), Gerd Hoffmann, 2022/03/18
- [PULL 6/6] hw/display/vga: Report a proper error when adding a 2nd ISA VGA, Gerd Hoffmann, 2022/03/18
- [PULL 3/6] audio/mixeng: Do not declare unused variables, Gerd Hoffmann, 2022/03/18
- [PULL 5/6] hw/display: Allow vga_common_init() to return errors, Gerd Hoffmann, 2022/03/18
- Re: [PULL 0/6] Fixes 20220318 patches, Peter Maydell, 2022/03/19