UI-related for 9.1
-----BEGIN PGP SIGNATURE----- iQJQBAABCAA6FiEEh6m9kz+HxgbSdvYt2ujhCXWWnOUFAmaeu44cHG1hcmNhbmRy ZS5sdXJlYXVAcmVkaGF0LmNvbQAKCRDa6OEJdZac5ZvNEACES6y1D4rzBtZBV/FY OvWHzM/2Uycma3CO2pTl8DzwucgUuVxVjrAppi+iIXza+qEHlN0e9tbmR8u3ypdV tu0ijRm1MWeV9EHw8fQxSIci9cgoPzJzfvrmGD9rPEJTPh44yifL3CiE97y/5SJx FkrmYoDeuLQ4WAgZqIhkFOZ3eX+bQ+sI49ZVm0vSIeZ2wYuWlw7JwMKq2Xb4fCsZ 7wJZcL7gNGHk3rsH2Sfukv5LRw64+eDwpQMkXS2scYp64xwhdd5bAqKchicBA0zh jBw+KszCpAW7XunQtXjiiQZco9x6auu2c+4erDyNcTfqBtSRNjArMauL2/609EVv 7xsLmwZvXgrbO7fRCGCnC4M5NCuisDbMeON+7tKdS8kfEMgFX0FNfM1Jp9z4Rh7T I/vy8mLlBIy4BNZA7jV1jyIJZeVYBYGc+ieBEeE1sK7L5RIxeoOwP1S20Xu9A9bO VFBohKcMt5x0HlUg0oSH8OJLbpQ8vDQDkIcDMIOQCqj+PX0erc2u9oHQ7xB1k3BB os83zWDTLJTJ+ZdoI2tp9FHQj56wdGJxDQNrRjFOP5KL1AoHGz+Y5fF7BvGB3jnK JsPV2OSkEs6Q/be6pLTiVEoUUEpqy40Kh/7NlzdbM+oHX5h0TlcIqJ16I2QsfM/N sRXAmzqCe00STyhxopR1BMZnjg== =aCj6 -----END PGP SIGNATURE----- Merge tag 'ui-pull-request' of https://gitlab.com/marcandre.lureau/qemu into staging UI-related for 9.1 # -----BEGIN PGP SIGNATURE----- # # iQJQBAABCAA6FiEEh6m9kz+HxgbSdvYt2ujhCXWWnOUFAmaeu44cHG1hcmNhbmRy # ZS5sdXJlYXVAcmVkaGF0LmNvbQAKCRDa6OEJdZac5ZvNEACES6y1D4rzBtZBV/FY # OvWHzM/2Uycma3CO2pTl8DzwucgUuVxVjrAppi+iIXza+qEHlN0e9tbmR8u3ypdV # tu0ijRm1MWeV9EHw8fQxSIci9cgoPzJzfvrmGD9rPEJTPh44yifL3CiE97y/5SJx # FkrmYoDeuLQ4WAgZqIhkFOZ3eX+bQ+sI49ZVm0vSIeZ2wYuWlw7JwMKq2Xb4fCsZ # 7wJZcL7gNGHk3rsH2Sfukv5LRw64+eDwpQMkXS2scYp64xwhdd5bAqKchicBA0zh # jBw+KszCpAW7XunQtXjiiQZco9x6auu2c+4erDyNcTfqBtSRNjArMauL2/609EVv # 7xsLmwZvXgrbO7fRCGCnC4M5NCuisDbMeON+7tKdS8kfEMgFX0FNfM1Jp9z4Rh7T # I/vy8mLlBIy4BNZA7jV1jyIJZeVYBYGc+ieBEeE1sK7L5RIxeoOwP1S20Xu9A9bO # VFBohKcMt5x0HlUg0oSH8OJLbpQ8vDQDkIcDMIOQCqj+PX0erc2u9oHQ7xB1k3BB # os83zWDTLJTJ+ZdoI2tp9FHQj56wdGJxDQNrRjFOP5KL1AoHGz+Y5fF7BvGB3jnK # JsPV2OSkEs6Q/be6pLTiVEoUUEpqy40Kh/7NlzdbM+oHX5h0TlcIqJ16I2QsfM/N # sRXAmzqCe00STyhxopR1BMZnjg== # =aCj6 # -----END PGP SIGNATURE----- # gpg: Signature made Tue 23 Jul 2024 06:05:34 AM AEST # gpg: using RSA key 87A9BD933F87C606D276F62DDAE8E10975969CE5 # gpg: issuer "marcandre.lureau@redhat.com" # gpg: Good signature from "Marc-André Lureau <marcandre.lureau@redhat.com>" [full] # gpg: aka "Marc-André Lureau <marcandre.lureau@gmail.com>" [full] * tag 'ui-pull-request' of https://gitlab.com/marcandre.lureau/qemu: chardev/char-win-stdio.c: restore old console mode ui/vdagent: send caps on fe_open ui/vdagent: notify clipboard peers of serial reset ui/vdagent: improve vdagent_fe_open() trace ui: add more tracing for dbus Cursor: 8 -> 1 bit alpha downsampling improvement virtio-gpu-gl: declare dependency on ui-opengl vnc: increase max display size Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
commit
3cce8bd4d7
@ -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;
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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");
|
||||
|
@ -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) {
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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,
|
||||
|
@ -130,9 +130,10 @@ 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_open(void) ""
|
||||
vdagent_fe_open(bool fe_open) "fe_open=%d"
|
||||
vdagent_close(void) ""
|
||||
vdagent_disconnect(void) ""
|
||||
vdagent_send(const char *name) "msg %s"
|
||||
@ -157,7 +158,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"
|
||||
|
11
ui/vdagent.c
11
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);
|
||||
@ -720,6 +721,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;
|
||||
@ -872,6 +875,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 +886,7 @@ static void vdagent_chr_set_fe_open(struct Chardev *chr, int fe_open)
|
||||
return;
|
||||
}
|
||||
|
||||
trace_vdagent_open();
|
||||
vdagent_send_caps(vd, true);
|
||||
}
|
||||
|
||||
static void vdagent_chr_parse(QemuOpts *opts, ChardevBackend *backend,
|
||||
|
4
ui/vnc.h
4
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)
|
||||
|
Loading…
Reference in New Issue
Block a user