* [Qemu-devel] [PATCH] console: ignore ui_info updates which don't actually update something
@ 2016-05-30 8:41 Gerd Hoffmann
0 siblings, 0 replies; only message in thread
From: Gerd Hoffmann @ 2016-05-30 8:41 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
ui/console.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/ui/console.c b/ui/console.c
index 6402010..581480f 100644
--- a/ui/console.c
+++ b/ui/console.c
@@ -1457,16 +1457,21 @@ bool dpy_ui_info_supported(QemuConsole *con)
int dpy_set_ui_info(QemuConsole *con, QemuUIInfo *info)
{
assert(con != NULL);
- con->ui_info = *info;
+
if (!dpy_ui_info_supported(con)) {
return -1;
}
+ if (memcmp(&con->ui_info, info, sizeof(con->ui_info)) == 0) {
+ /* nothing changed -- ignore */
+ return 0;
+ }
/*
* Typically we get a flood of these as the user resizes the window.
* Wait until the dust has settled (one second without updates), then
* go notify the guest.
*/
+ con->ui_info = *info;
timer_mod(con->ui_timer, qemu_clock_get_ms(QEMU_CLOCK_REALTIME) + 1000);
return 0;
}
--
1.8.3.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2016-05-30 8:41 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-30 8:41 [Qemu-devel] [PATCH] console: ignore ui_info updates which don't actually update something Gerd Hoffmann
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).