qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PULL 0/8] Ui patches
@ 2024-07-22 20:06 marcandre.lureau
  2024-07-22 20:06 ` [PULL 1/8] vnc: increase max display size marcandre.lureau
                   ` (9 more replies)
  0 siblings, 10 replies; 14+ messages in thread
From: marcandre.lureau @ 2024-07-22 20:06 UTC (permalink / raw)
  To: qemu-devel; +Cc: richard.henderson, Marc-André Lureau

From: Marc-André Lureau <marcandre.lureau@redhat.com>

The following changes since commit a7ddb48bd1363c8bcdf42776d320289c42191f01:

  Merge tag 'pull-aspeed-20240721' of https://github.com/legoater/qemu into staging (2024-07-22 07:52:05 +1000)

are available in the Git repository at:

  https://gitlab.com/marcandre.lureau/qemu.git tags/ui-pull-request

for you to fetch changes up to 903cc9e1173e0778caa50871e8275c898770c690:

  chardev/char-win-stdio.c: restore old console mode (2024-07-22 22:25:46 +0400)

----------------------------------------------------------------
UI-related for 9.1

----------------------------------------------------------------

Gerd Hoffmann (1):
  vnc: increase max display size

Marc-André Lureau (5):
  virtio-gpu-gl: declare dependency on ui-opengl
  ui: add more tracing for dbus
  ui/vdagent: improve vdagent_fe_open() trace
  ui/vdagent: notify clipboard peers of serial reset
  ui/vdagent: send caps on fe_open

Phil Dennis-Jordan (1):
  Cursor: 8 -> 1 bit alpha downsampling improvement

songziming (1):
  chardev/char-win-stdio.c: restore old console mode

 ui/vnc.h                   |  4 ++--
 audio/dbusaudio.c          |  2 +-
 chardev/char-win-stdio.c   |  5 +++++
 hw/display/virtio-gpu-gl.c |  1 +
 ui/clipboard.c             |  2 ++
 ui/cursor.c                |  2 +-
 ui/dbus-clipboard.c        |  4 ++++
 ui/vdagent.c               | 11 ++++++++---
 audio/trace-events         |  2 +-
 ui/trace-events            |  5 ++++-
 10 files changed, 29 insertions(+), 9 deletions(-)

-- 
2.45.2.827.g557ae147e6



^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PULL 1/8] vnc: increase max display size
  2024-07-22 20:06 [PULL 0/8] Ui patches marcandre.lureau
@ 2024-07-22 20:06 ` marcandre.lureau
  2024-07-22 20:06 ` [PULL 2/8] virtio-gpu-gl: declare dependency on ui-opengl marcandre.lureau
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 14+ messages in thread
From: marcandre.lureau @ 2024-07-22 20:06 UTC (permalink / raw)
  To: qemu-devel; +Cc: richard.henderson, Gerd Hoffmann, Marc-André Lureau

From: Gerd Hoffmann <kraxel@redhat.com>

It's 2024.  4k display resolutions are a thing these days.
Raise width and height limits of the qemu vnc server.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1596
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-ID: <20240530111029.1726329-1-kraxel@redhat.com>
---
 ui/vnc.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ui/vnc.h b/ui/vnc.h
index 4521dc88f7..e5fa2efa3e 100644
--- a/ui/vnc.h
+++ b/ui/vnc.h
@@ -81,8 +81,8 @@ typedef void VncSendHextileTile(VncState *vs,
 
 /* VNC_MAX_WIDTH must be a multiple of VNC_DIRTY_PIXELS_PER_BIT. */
 
-#define VNC_MAX_WIDTH ROUND_UP(2560, VNC_DIRTY_PIXELS_PER_BIT)
-#define VNC_MAX_HEIGHT 2048
+#define VNC_MAX_WIDTH ROUND_UP(5120, VNC_DIRTY_PIXELS_PER_BIT)
+#define VNC_MAX_HEIGHT 2160
 
 /* VNC_DIRTY_BITS is the number of bits in the dirty bitmap. */
 #define VNC_DIRTY_BITS (VNC_MAX_WIDTH / VNC_DIRTY_PIXELS_PER_BIT)
-- 
2.45.2.827.g557ae147e6



^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PULL 2/8] virtio-gpu-gl: declare dependency on ui-opengl
  2024-07-22 20:06 [PULL 0/8] Ui patches marcandre.lureau
  2024-07-22 20:06 ` [PULL 1/8] vnc: increase max display size marcandre.lureau
@ 2024-07-22 20:06 ` marcandre.lureau
  2024-07-22 20:06 ` [PULL 3/8] Cursor: 8 -> 1 bit alpha downsampling improvement marcandre.lureau
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 14+ messages in thread
From: marcandre.lureau @ 2024-07-22 20:06 UTC (permalink / raw)
  To: qemu-devel; +Cc: richard.henderson, Marc-André Lureau, Michael S. Tsirkin

From: Marc-André Lureau <marcandre.lureau@redhat.com>

Since commit e8a2db94 "virtio-gpu-virgl: teach it to get the QEMU EGL
display", virtio-gl depends on ui-opengl symbol "qemu_egl_display".

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2391
Fixes: e8a2db94 ("virtio-gpu-virgl: teach it to get the QEMU EGL display")
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 hw/display/virtio-gpu-gl.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/display/virtio-gpu-gl.c b/hw/display/virtio-gpu-gl.c
index e06be60dfb..952820a425 100644
--- a/hw/display/virtio-gpu-gl.c
+++ b/hw/display/virtio-gpu-gl.c
@@ -170,3 +170,4 @@ static void virtio_register_types(void)
 type_init(virtio_register_types)
 
 module_dep("hw-display-virtio-gpu");
+module_dep("ui-opengl");
-- 
2.45.2.827.g557ae147e6



^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PULL 3/8] Cursor: 8 -> 1 bit alpha downsampling improvement
  2024-07-22 20:06 [PULL 0/8] Ui patches marcandre.lureau
  2024-07-22 20:06 ` [PULL 1/8] vnc: increase max display size marcandre.lureau
  2024-07-22 20:06 ` [PULL 2/8] virtio-gpu-gl: declare dependency on ui-opengl marcandre.lureau
@ 2024-07-22 20:06 ` marcandre.lureau
  2024-07-22 20:06 ` [PULL 4/8] ui: add more tracing for dbus marcandre.lureau
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 14+ messages in thread
From: marcandre.lureau @ 2024-07-22 20:06 UTC (permalink / raw)
  To: qemu-devel; +Cc: richard.henderson, Phil Dennis-Jordan, Marc-André Lureau

From: Phil Dennis-Jordan <phil@philjordan.eu>

Mouse cursors with 8 bit alpha were downsampled to 1-bit opacity maps by
turning alpha values of 255 into 1 and everything else into 0. This
means that mostly-opaque pixels ended up completely invisible.

This patch changes the behaviour so that only pixels with less than 50%
alpha (0-127) are treated as transparent when converted to 1-bit alpha.

This greatly improves the subjective appearance of anti-aliased mouse
cursors, such as those used by macOS, when using a front-end UI without
support for alpha-blended cursors, such as some VNC clients.

Signed-off-by: Phil Dennis-Jordan <phil@philjordan.eu>
Reviewed-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20240624101040.82726-1-phil@philjordan.eu>
---
 ui/cursor.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ui/cursor.c b/ui/cursor.c
index 29717b3ecb..dd3853320d 100644
--- a/ui/cursor.c
+++ b/ui/cursor.c
@@ -232,7 +232,7 @@ void cursor_get_mono_mask(QEMUCursor *c, int transparent, uint8_t *mask)
     for (y = 0; y < c->height; y++) {
         bit = 0x80;
         for (x = 0; x < c->width; x++, data++) {
-            if ((*data & 0xff000000) != 0xff000000) {
+            if ((*data & 0x80000000) == 0x0) { /* Alpha < 0x80 (128) */
                 if (transparent != 0) {
                     mask[x/8] |= bit;
                 }
-- 
2.45.2.827.g557ae147e6



^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PULL 4/8] ui: add more tracing for dbus
  2024-07-22 20:06 [PULL 0/8] Ui patches marcandre.lureau
                   ` (2 preceding siblings ...)
  2024-07-22 20:06 ` [PULL 3/8] Cursor: 8 -> 1 bit alpha downsampling improvement marcandre.lureau
@ 2024-07-22 20:06 ` marcandre.lureau
  2024-07-22 20:06 ` [PULL 5/8] ui/vdagent: improve vdagent_fe_open() trace marcandre.lureau
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 14+ messages in thread
From: marcandre.lureau @ 2024-07-22 20:06 UTC (permalink / raw)
  To: qemu-devel; +Cc: richard.henderson, Marc-André Lureau, Gerd Hoffmann

From: Marc-André Lureau <marcandre.lureau@redhat.com>

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20240717171541.201525-2-marcandre.lureau@redhat.com>
---
 audio/dbusaudio.c   | 2 +-
 ui/dbus-clipboard.c | 4 ++++
 audio/trace-events  | 2 +-
 ui/trace-events     | 2 ++
 4 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/audio/dbusaudio.c b/audio/dbusaudio.c
index 60fcf643ec..095e739382 100644
--- a/audio/dbusaudio.c
+++ b/audio/dbusaudio.c
@@ -105,7 +105,7 @@ static size_t dbus_put_buffer_out(HWVoiceOut *hw, void *buf, size_t size)
     assert(buf == vo->buf + vo->buf_pos && vo->buf_pos + size <= vo->buf_size);
     vo->buf_pos += size;
 
-    trace_dbus_audio_put_buffer_out(size);
+    trace_dbus_audio_put_buffer_out(vo->buf_pos, vo->buf_size);
 
     if (vo->buf_pos < vo->buf_size) {
         return size;
diff --git a/ui/dbus-clipboard.c b/ui/dbus-clipboard.c
index fe7fcdecb6..fbb043abca 100644
--- a/ui/dbus-clipboard.c
+++ b/ui/dbus-clipboard.c
@@ -141,6 +141,8 @@ dbus_clipboard_qemu_request(QemuClipboardInfo *info,
     const char *mimes[] = { MIME_TEXT_PLAIN_UTF8, NULL };
     size_t n;
 
+    trace_dbus_clipboard_qemu_request(type);
+
     if (type != QEMU_CLIPBOARD_TYPE_TEXT) {
         /* unsupported atm */
         return;
@@ -305,6 +307,8 @@ dbus_clipboard_grab(
         return DBUS_METHOD_INVOCATION_HANDLED;
     }
 
+    trace_dbus_clipboard_grab(arg_selection, arg_serial);
+
     if (s >= QEMU_CLIPBOARD_SELECTION__COUNT) {
         g_dbus_method_invocation_return_error(
             invocation,
diff --git a/audio/trace-events b/audio/trace-events
index ab04f020ce..7e3f1593c8 100644
--- a/audio/trace-events
+++ b/audio/trace-events
@@ -15,7 +15,7 @@ oss_version(int version) "OSS version = 0x%x"
 
 # dbusaudio.c
 dbus_audio_register(const char *s, const char *dir) "sender = %s, dir = %s"
-dbus_audio_put_buffer_out(size_t len) "len = %zu"
+dbus_audio_put_buffer_out(size_t pos, size_t size) "buf_pos = %zu, buf_size = %zu"
 dbus_audio_read(size_t len) "len = %zu"
 
 # pwaudio.c
diff --git a/ui/trace-events b/ui/trace-events
index 69ff22955d..07eb494246 100644
--- a/ui/trace-events
+++ b/ui/trace-events
@@ -157,7 +157,9 @@ dbus_mouse_rel_motion(int dx, int dy) "dx=%d, dy=%d"
 dbus_touch_send_event(unsigned int kind, uint32_t num_slot, uint32_t x, uint32_t y) "kind=%u, num_slot=%u, x=%d, y=%d"
 dbus_update(int x, int y, int w, int h) "x=%d, y=%d, w=%d, h=%d"
 dbus_update_gl(int x, int y, int w, int h) "x=%d, y=%d, w=%d, h=%d"
+dbus_clipboard_grab(int selection, unsigned int serial) "selection=%d serial=%u"
 dbus_clipboard_grab_failed(void) ""
+dbus_clipboard_qemu_request(int type) "type=%d"
 dbus_clipboard_register(const char *bus_name) "peer %s"
 dbus_clipboard_unregister(const char *bus_name) "peer %s"
 dbus_scanout_texture(uint32_t tex_id, bool backing_y_0_top, uint32_t backing_width, uint32_t backing_height, uint32_t x, uint32_t y, uint32_t w, uint32_t h) "tex_id:%u y0top:%d back:%ux%u %u+%u-%ux%u"
-- 
2.45.2.827.g557ae147e6



^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PULL 5/8] ui/vdagent: improve vdagent_fe_open() trace
  2024-07-22 20:06 [PULL 0/8] Ui patches marcandre.lureau
                   ` (3 preceding siblings ...)
  2024-07-22 20:06 ` [PULL 4/8] ui: add more tracing for dbus marcandre.lureau
@ 2024-07-22 20:06 ` marcandre.lureau
  2024-07-22 20:06 ` [PULL 6/8] ui/vdagent: notify clipboard peers of serial reset marcandre.lureau
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 14+ messages in thread
From: marcandre.lureau @ 2024-07-22 20:06 UTC (permalink / raw)
  To: qemu-devel; +Cc: richard.henderson, Marc-André Lureau

From: Marc-André Lureau <marcandre.lureau@redhat.com>

Place the trace when the function enters, with arg value.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20240717171541.201525-3-marcandre.lureau@redhat.com>
---
 ui/vdagent.c    | 3 ++-
 ui/trace-events | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/ui/vdagent.c b/ui/vdagent.c
index 64d7ab245a..cb74739bc4 100644
--- a/ui/vdagent.c
+++ b/ui/vdagent.c
@@ -872,6 +872,8 @@ static void vdagent_chr_set_fe_open(struct Chardev *chr, int fe_open)
 {
     VDAgentChardev *vd = QEMU_VDAGENT_CHARDEV(chr);
 
+    trace_vdagent_fe_open(fe_open);
+
     if (!fe_open) {
         trace_vdagent_close();
         vdagent_disconnect(vd);
@@ -881,7 +883,6 @@ static void vdagent_chr_set_fe_open(struct Chardev *chr, int fe_open)
         return;
     }
 
-    trace_vdagent_open();
 }
 
 static void vdagent_chr_parse(QemuOpts *opts, ChardevBackend *backend,
diff --git a/ui/trace-events b/ui/trace-events
index 07eb494246..f5faa149d2 100644
--- a/ui/trace-events
+++ b/ui/trace-events
@@ -132,7 +132,7 @@ xkeymap_keymap(const char *name) "keymap '%s'"
 clipboard_check_serial(int cur, int recv, bool ok) "cur:%d recv:%d %d"
 
 # vdagent.c
-vdagent_open(void) ""
+vdagent_fe_open(bool fe_open) "fe_open=%d"
 vdagent_close(void) ""
 vdagent_disconnect(void) ""
 vdagent_send(const char *name) "msg %s"
-- 
2.45.2.827.g557ae147e6



^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PULL 6/8] ui/vdagent: notify clipboard peers of serial reset
  2024-07-22 20:06 [PULL 0/8] Ui patches marcandre.lureau
                   ` (4 preceding siblings ...)
  2024-07-22 20:06 ` [PULL 5/8] ui/vdagent: improve vdagent_fe_open() trace marcandre.lureau
@ 2024-07-22 20:06 ` marcandre.lureau
  2024-07-22 20:06 ` [PULL 7/8] ui/vdagent: send caps on fe_open marcandre.lureau
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 14+ messages in thread
From: marcandre.lureau @ 2024-07-22 20:06 UTC (permalink / raw)
  To: qemu-devel; +Cc: richard.henderson, Marc-André Lureau

From: Marc-André Lureau <marcandre.lureau@redhat.com>

Since we reset the serial counters, peers should also be reset to be sync.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20240717171541.201525-4-marcandre.lureau@redhat.com>
---
 ui/clipboard.c  | 2 ++
 ui/vdagent.c    | 2 ++
 ui/trace-events | 1 +
 3 files changed, 5 insertions(+)

diff --git a/ui/clipboard.c b/ui/clipboard.c
index 4264884a6c..132086eb13 100644
--- a/ui/clipboard.c
+++ b/ui/clipboard.c
@@ -155,6 +155,8 @@ void qemu_clipboard_reset_serial(void)
     QemuClipboardNotify notify = { .type = QEMU_CLIPBOARD_RESET_SERIAL };
     int i;
 
+    trace_clipboard_reset_serial();
+
     for (i = 0; i < QEMU_CLIPBOARD_SELECTION__COUNT; i++) {
         QemuClipboardInfo *info = qemu_clipboard_info(i);
         if (info) {
diff --git a/ui/vdagent.c b/ui/vdagent.c
index cb74739bc4..2a4b3574b1 100644
--- a/ui/vdagent.c
+++ b/ui/vdagent.c
@@ -720,6 +720,8 @@ static void vdagent_chr_recv_caps(VDAgentChardev *vd, VDAgentMessage *msg)
     memset(vd->last_serial, 0, sizeof(vd->last_serial));
 
     if (have_clipboard(vd) && vd->cbpeer.notifier.notify == NULL) {
+        qemu_clipboard_reset_serial();
+
         vd->cbpeer.name = "vdagent";
         vd->cbpeer.notifier.notify = vdagent_clipboard_notify;
         vd->cbpeer.request = vdagent_clipboard_request;
diff --git a/ui/trace-events b/ui/trace-events
index f5faa149d2..fb253c1666 100644
--- a/ui/trace-events
+++ b/ui/trace-events
@@ -130,6 +130,7 @@ xkeymap_keymap(const char *name) "keymap '%s'"
 
 # clipboard.c
 clipboard_check_serial(int cur, int recv, bool ok) "cur:%d recv:%d %d"
+clipboard_reset_serial(void) ""
 
 # vdagent.c
 vdagent_fe_open(bool fe_open) "fe_open=%d"
-- 
2.45.2.827.g557ae147e6



^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PULL 7/8] ui/vdagent: send caps on fe_open
  2024-07-22 20:06 [PULL 0/8] Ui patches marcandre.lureau
                   ` (5 preceding siblings ...)
  2024-07-22 20:06 ` [PULL 6/8] ui/vdagent: notify clipboard peers of serial reset marcandre.lureau
@ 2024-07-22 20:06 ` marcandre.lureau
  2024-07-22 20:06 ` [PULL 8/8] chardev/char-win-stdio.c: restore old console mode marcandre.lureau
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 14+ messages in thread
From: marcandre.lureau @ 2024-07-22 20:06 UTC (permalink / raw)
  To: qemu-devel; +Cc: richard.henderson, Marc-André Lureau

From: Marc-André Lureau <marcandre.lureau@redhat.com>

The spice-vdagentd doesn't send capabilities again on host/client
disconnect (but when the session agent connects and sends a
GUEST_XORG_RESOLUTION message)

When the dbus client disconnects, vdagent_disconnect() is called to
reset the agent state. Capabilities must be negotiated again on
reconnection.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-Id: <20240717171541.201525-5-marcandre.lureau@redhat.com>
---
 ui/vdagent.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/ui/vdagent.c b/ui/vdagent.c
index 2a4b3574b1..724eff972f 100644
--- a/ui/vdagent.c
+++ b/ui/vdagent.c
@@ -185,7 +185,7 @@ static void vdagent_send_msg(VDAgentChardev *vd, VDAgentMessage *msg)
     vdagent_send_buf(vd);
 }
 
-static void vdagent_send_caps(VDAgentChardev *vd)
+static void vdagent_send_caps(VDAgentChardev *vd, bool request)
 {
     g_autofree VDAgentMessage *msg = g_malloc0(sizeof(VDAgentMessage) +
                                                sizeof(VDAgentAnnounceCapabilities) +
@@ -205,6 +205,7 @@ static void vdagent_send_caps(VDAgentChardev *vd)
 #endif
     }
 
+    caps->request = request;
     vdagent_send_msg(vd, msg);
 }
 
@@ -711,7 +712,7 @@ static void vdagent_chr_recv_caps(VDAgentChardev *vd, VDAgentMessage *msg)
 
     vd->caps = caps->caps[0];
     if (caps->request) {
-        vdagent_send_caps(vd);
+        vdagent_send_caps(vd, false);
     }
     if (have_mouse(vd) && vd->mouse_hs) {
         qemu_input_handler_activate(vd->mouse_hs);
@@ -885,6 +886,7 @@ static void vdagent_chr_set_fe_open(struct Chardev *chr, int fe_open)
         return;
     }
 
+    vdagent_send_caps(vd, true);
 }
 
 static void vdagent_chr_parse(QemuOpts *opts, ChardevBackend *backend,
-- 
2.45.2.827.g557ae147e6



^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PULL 8/8] chardev/char-win-stdio.c: restore old console mode
  2024-07-22 20:06 [PULL 0/8] Ui patches marcandre.lureau
                   ` (6 preceding siblings ...)
  2024-07-22 20:06 ` [PULL 7/8] ui/vdagent: send caps on fe_open marcandre.lureau
@ 2024-07-22 20:06 ` marcandre.lureau
  2024-07-22 21:24 ` [PULL 0/8] Ui patches Philippe Mathieu-Daudé
  2024-07-23 14:59 ` Richard Henderson
  9 siblings, 0 replies; 14+ messages in thread
From: marcandre.lureau @ 2024-07-22 20:06 UTC (permalink / raw)
  To: qemu-devel
  Cc: richard.henderson, songziming, Marc-André Lureau,
	Paolo Bonzini

From: songziming <s.ziming@hotmail.com>

If I use `-serial stdio` on Windows, after QEMU exits, the terminal
could not handle arrow keys and tab any more. Because stdio backend
on Windows sets console mode to virtual terminal input when starts,
but does not restore the old mode when finalize.

This small patch saves the old console mode and set it back.

Signed-off-by: Ziming Song <s.ziming@hotmail.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-ID: <ME3P282MB25488BE7C39BF0C35CD0DA5D8CA82@ME3P282MB2548.AUSP282.PROD.OUTLOOK.COM>
---
 chardev/char-win-stdio.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/chardev/char-win-stdio.c b/chardev/char-win-stdio.c
index 1a18999e78..13325ca967 100644
--- a/chardev/char-win-stdio.c
+++ b/chardev/char-win-stdio.c
@@ -33,6 +33,7 @@
 struct WinStdioChardev {
     Chardev parent;
     HANDLE  hStdIn;
+    DWORD   dwOldMode;
     HANDLE  hInputReadyEvent;
     HANDLE  hInputDoneEvent;
     HANDLE  hInputThread;
@@ -159,6 +160,7 @@ static void qemu_chr_open_stdio(Chardev *chr,
     }
 
     is_console = GetConsoleMode(stdio->hStdIn, &dwMode) != 0;
+    stdio->dwOldMode = dwMode;
 
     if (is_console) {
         if (qemu_add_wait_object(stdio->hStdIn,
@@ -221,6 +223,9 @@ static void char_win_stdio_finalize(Object *obj)
 {
     WinStdioChardev *stdio = WIN_STDIO_CHARDEV(obj);
 
+    if (stdio->hStdIn != INVALID_HANDLE_VALUE) {
+        SetConsoleMode(stdio->hStdIn, stdio->dwOldMode);
+    }
     if (stdio->hInputReadyEvent != INVALID_HANDLE_VALUE) {
         CloseHandle(stdio->hInputReadyEvent);
     }
-- 
2.45.2.827.g557ae147e6



^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PULL 0/8] Ui patches
  2024-07-22 20:06 [PULL 0/8] Ui patches marcandre.lureau
                   ` (7 preceding siblings ...)
  2024-07-22 20:06 ` [PULL 8/8] chardev/char-win-stdio.c: restore old console mode marcandre.lureau
@ 2024-07-22 21:24 ` Philippe Mathieu-Daudé
  2024-07-23 14:59 ` Richard Henderson
  9 siblings, 0 replies; 14+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-07-22 21:24 UTC (permalink / raw)
  To: marcandre.lureau, qemu-devel; +Cc: richard.henderson

On 22/7/24 22:06, marcandre.lureau@redhat.com wrote:
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
> 
> The following changes since commit a7ddb48bd1363c8bcdf42776d320289c42191f01:
> 
>    Merge tag 'pull-aspeed-20240721' of https://github.com/legoater/qemu into staging (2024-07-22 07:52:05 +1000)
> 
> are available in the Git repository at:
> 
>    https://gitlab.com/marcandre.lureau/qemu.git tags/ui-pull-request
> 
> for you to fetch changes up to 903cc9e1173e0778caa50871e8275c898770c690:
> 
>    chardev/char-win-stdio.c: restore old console mode (2024-07-22 22:25:46 +0400)
> 
> ----------------------------------------------------------------
> UI-related for 9.1

Thanks Marc-André :)



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PULL 0/8] Ui patches
  2024-07-22 20:06 [PULL 0/8] Ui patches marcandre.lureau
                   ` (8 preceding siblings ...)
  2024-07-22 21:24 ` [PULL 0/8] Ui patches Philippe Mathieu-Daudé
@ 2024-07-23 14:59 ` Richard Henderson
  9 siblings, 0 replies; 14+ messages in thread
From: Richard Henderson @ 2024-07-23 14:59 UTC (permalink / raw)
  To: marcandre.lureau, qemu-devel

On 7/23/24 06:06, marcandre.lureau@redhat.com wrote:
> From: Marc-André Lureau<marcandre.lureau@redhat.com>
> 
> The following changes since commit a7ddb48bd1363c8bcdf42776d320289c42191f01:
> 
>    Merge tag 'pull-aspeed-20240721' ofhttps://github.com/legoater/qemu into staging (2024-07-22 07:52:05 +1000)
> 
> are available in the Git repository at:
> 
>    https://gitlab.com/marcandre.lureau/qemu.git tags/ui-pull-request
> 
> for you to fetch changes up to 903cc9e1173e0778caa50871e8275c898770c690:
> 
>    chardev/char-win-stdio.c: restore old console mode (2024-07-22 22:25:46 +0400)
> 
> ----------------------------------------------------------------
> UI-related for 9.1


Applied, thanks.  Please update https://wiki.qemu.org/ChangeLog/9.1 as appropriate.

r~


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PULL 0/8] Ui patches
@ 2025-02-03 12:57 marcandre.lureau
  2025-02-03 14:28 ` Stefan Hajnoczi
  0 siblings, 1 reply; 14+ messages in thread
From: marcandre.lureau @ 2025-02-03 12:57 UTC (permalink / raw)
  To: qemu-devel
  Cc: Eric Blake, Paolo Bonzini, Mahmoud Mandour, Markus Armbruster,
	peter.maydell, Gerd Hoffmann, Alexandre Iooss, Alex Bennée,
	Pierrick Bouvier, Marc-André Lureau

From: Marc-André Lureau <marcandre.lureau@redhat.com>

The following changes since commit 6fccaa2fba391815308a746d68f7fa197bc93586:

  Merge tag 'block-pull-request' of https://gitlab.com/stefanha/qemu into staging (2025-02-02 11:09:10 -0500)

are available in the Git repository at:

  https://gitlab.com/marcandre.lureau/qemu.git tags/ui-pull-request

for you to fetch changes up to f327a2cea1502a8cad2beb13bc4e2c12b95b10ba:

  dbus: add -audio dbus nsamples option (2025-02-03 13:58:08 +0400)

----------------------------------------------------------------
UI/chardev-related patch queue

----------------------------------------------------------------

Marc-André Lureau (4):
  ui/dbus: on win32, allow ANONYMOUS with p2p
  ui/dbus: clarify the kind of win32 handle that is shared
  plugins: fix -Werror=maybe-uninitialized false-positive
  dbus: add -audio dbus nsamples option

Roman Penyaev (4):
  chardev/char-pty: send CHR_EVENT_CLOSED on disconnect
  chardev/char-hub: implement backend chardev aggregator
  tests/unit/test-char: add unit tests for hub chardev backend
  qemu-options.hx: describe hub chardev and aggregation of several
    backends

 qapi/audio.json            |  22 +-
 qapi/char.json             |  27 +++
 chardev/chardev-internal.h |  51 ++++-
 include/chardev/char.h     |   1 +
 audio/dbusaudio.c          |  29 ++-
 chardev/char-hub.c         | 301 ++++++++++++++++++++++++++++
 chardev/char-pty.c         |   4 +-
 chardev/char.c             |  23 ++-
 contrib/plugins/cache.c    |   2 +-
 tests/unit/test-char.c     | 398 +++++++++++++++++++++++++++++++++++++
 ui/dbus-console.c          |   8 +-
 ui/dbus.c                  |  10 +-
 chardev/meson.build        |   1 +
 qemu-options.hx            |  49 ++++-
 ui/dbus-display1.xml       |  16 +-
 15 files changed, 923 insertions(+), 19 deletions(-)
 create mode 100644 chardev/char-hub.c

-- 
2.47.0



^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PULL 0/8] Ui patches
  2025-02-03 12:57 marcandre.lureau
@ 2025-02-03 14:28 ` Stefan Hajnoczi
  2025-02-03 17:19   ` Marc-André Lureau
  0 siblings, 1 reply; 14+ messages in thread
From: Stefan Hajnoczi @ 2025-02-03 14:28 UTC (permalink / raw)
  To: marcandre.lureau
  Cc: qemu-devel, Eric Blake, Paolo Bonzini, Mahmoud Mandour,
	Markus Armbruster, peter.maydell, Gerd Hoffmann, Alexandre Iooss,
	Alex Bennée, Pierrick Bouvier

On Mon, Feb 3, 2025 at 7:58 AM <marcandre.lureau@redhat.com> wrote:
>
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
>
> The following changes since commit 6fccaa2fba391815308a746d68f7fa197bc93586:
>
>   Merge tag 'block-pull-request' of https://gitlab.com/stefanha/qemu into staging (2025-02-02 11:09:10 -0500)
>
> are available in the Git repository at:
>
>   https://gitlab.com/marcandre.lureau/qemu.git tags/ui-pull-request
>
> for you to fetch changes up to f327a2cea1502a8cad2beb13bc4e2c12b95b10ba:
>
>   dbus: add -audio dbus nsamples option (2025-02-03 13:58:08 +0400)
>
> ----------------------------------------------------------------
> UI/chardev-related patch queue
>
> ----------------------------------------------------------------
>
> Marc-André Lureau (4):
>   ui/dbus: on win32, allow ANONYMOUS with p2p

Hi Marc-André,
There is an unexpected submodule update in this commit. Although it's
not included in the patch email sent to the mailing list, GitLab shows
it:
https://gitlab.com/marcandre.lureau/qemu/-/commit/31d9023965ba1963afd1e0e0f48c75399a7bc23e

Please rebase onto qemu.git/master and remove the spurious libvirt-ci
submodule update before resending this pull request. Thank you!

Stefan

>   ui/dbus: clarify the kind of win32 handle that is shared
>   plugins: fix -Werror=maybe-uninitialized false-positive
>   dbus: add -audio dbus nsamples option
>
> Roman Penyaev (4):
>   chardev/char-pty: send CHR_EVENT_CLOSED on disconnect
>   chardev/char-hub: implement backend chardev aggregator
>   tests/unit/test-char: add unit tests for hub chardev backend
>   qemu-options.hx: describe hub chardev and aggregation of several
>     backends
>
>  qapi/audio.json            |  22 +-
>  qapi/char.json             |  27 +++
>  chardev/chardev-internal.h |  51 ++++-
>  include/chardev/char.h     |   1 +
>  audio/dbusaudio.c          |  29 ++-
>  chardev/char-hub.c         | 301 ++++++++++++++++++++++++++++
>  chardev/char-pty.c         |   4 +-
>  chardev/char.c             |  23 ++-
>  contrib/plugins/cache.c    |   2 +-
>  tests/unit/test-char.c     | 398 +++++++++++++++++++++++++++++++++++++
>  ui/dbus-console.c          |   8 +-
>  ui/dbus.c                  |  10 +-
>  chardev/meson.build        |   1 +
>  qemu-options.hx            |  49 ++++-
>  ui/dbus-display1.xml       |  16 +-
>  15 files changed, 923 insertions(+), 19 deletions(-)
>  create mode 100644 chardev/char-hub.c
>
> --
> 2.47.0
>
>


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PULL 0/8] Ui patches
  2025-02-03 14:28 ` Stefan Hajnoczi
@ 2025-02-03 17:19   ` Marc-André Lureau
  0 siblings, 0 replies; 14+ messages in thread
From: Marc-André Lureau @ 2025-02-03 17:19 UTC (permalink / raw)
  To: Stefan Hajnoczi
  Cc: qemu-devel, Eric Blake, Paolo Bonzini, Mahmoud Mandour,
	Markus Armbruster, peter.maydell, Gerd Hoffmann, Alexandre Iooss,
	Alex Bennée, Pierrick Bouvier

Hi

On Mon, Feb 3, 2025 at 6:29 PM Stefan Hajnoczi <stefanha@gmail.com> wrote:
>
> On Mon, Feb 3, 2025 at 7:58 AM <marcandre.lureau@redhat.com> wrote:
> >
> > From: Marc-André Lureau <marcandre.lureau@redhat.com>
> >
> > The following changes since commit 6fccaa2fba391815308a746d68f7fa197bc93586:
> >
> >   Merge tag 'block-pull-request' of https://gitlab.com/stefanha/qemu into staging (2025-02-02 11:09:10 -0500)
> >
> > are available in the Git repository at:
> >
> >   https://gitlab.com/marcandre.lureau/qemu.git tags/ui-pull-request
> >
> > for you to fetch changes up to f327a2cea1502a8cad2beb13bc4e2c12b95b10ba:
> >
> >   dbus: add -audio dbus nsamples option (2025-02-03 13:58:08 +0400)
> >
> > ----------------------------------------------------------------
> > UI/chardev-related patch queue
> >
> > ----------------------------------------------------------------
> >
> > Marc-André Lureau (4):
> >   ui/dbus: on win32, allow ANONYMOUS with p2p
>
> Hi Marc-André,
> There is an unexpected submodule update in this commit. Although it's
> not included in the patch email sent to the mailing list, GitLab shows
> it:
> https://gitlab.com/marcandre.lureau/qemu/-/commit/31d9023965ba1963afd1e0e0f48c75399a7bc23e
>
> Please rebase onto qemu.git/master and remove the spurious libvirt-ci
> submodule update before resending this pull request. Thank you!
>

Sorry, bad .gitconfig.. resent, thanks


-- 
Marc-André Lureau


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2025-02-03 17:20 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-22 20:06 [PULL 0/8] Ui patches marcandre.lureau
2024-07-22 20:06 ` [PULL 1/8] vnc: increase max display size marcandre.lureau
2024-07-22 20:06 ` [PULL 2/8] virtio-gpu-gl: declare dependency on ui-opengl marcandre.lureau
2024-07-22 20:06 ` [PULL 3/8] Cursor: 8 -> 1 bit alpha downsampling improvement marcandre.lureau
2024-07-22 20:06 ` [PULL 4/8] ui: add more tracing for dbus marcandre.lureau
2024-07-22 20:06 ` [PULL 5/8] ui/vdagent: improve vdagent_fe_open() trace marcandre.lureau
2024-07-22 20:06 ` [PULL 6/8] ui/vdagent: notify clipboard peers of serial reset marcandre.lureau
2024-07-22 20:06 ` [PULL 7/8] ui/vdagent: send caps on fe_open marcandre.lureau
2024-07-22 20:06 ` [PULL 8/8] chardev/char-win-stdio.c: restore old console mode marcandre.lureau
2024-07-22 21:24 ` [PULL 0/8] Ui patches Philippe Mathieu-Daudé
2024-07-23 14:59 ` Richard Henderson
  -- strict thread matches above, loose matches on Subject: below --
2025-02-03 12:57 marcandre.lureau
2025-02-03 14:28 ` Stefan Hajnoczi
2025-02-03 17:19   ` Marc-André Lureau

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).