mirror of
https://gitlab.com/qemu-project/qemu.git
synced 2026-08-26 22:23:12 -04:00
ui/clipboard: clear deferred serial reset flag on resume
cb_reset_serial_on_resume defers a clipboard serial reset until the
machine runs again. qemu_clipboard_change_state() performs that reset
on resume, but leaves the flag set.
As a result, every later transition back to RUNNING triggers another
QEMU_CLIPBOARD_RESET_SERIAL notification even when no reset is pending.
That causes unnecessary reset handling in clipboard backends such as
vdagent and dbus.
Clear the deferred flag before resetting so the reset is performed only
once for each deferred request.
Fixes: c967ff606b ("ui/clipboard: delay clipboard update when not running")
Signed-off-by: GuoHan Zhao <zhaoguohan@kylinos.cn>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-ID: <20260416070403.1683648-1-zhaoguohan@kylinos.cn>
This commit is contained in:
parent
7437b3eab6
commit
208dfd7d08
1 changed files with 1 additions and 0 deletions
|
|
@ -47,6 +47,7 @@ static void qemu_clipboard_change_state(void *opaque, bool running, RunState sta
|
|||
}
|
||||
|
||||
if (cb_reset_serial_on_resume) {
|
||||
cb_reset_serial_on_resume = false;
|
||||
qemu_clipboard_reset_serial();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue