aboutsummaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2016-05-30 10:41:13 +0200
committerGerd Hoffmann <kraxel@redhat.com>2016-06-10 11:16:18 +0200
commit1185fde40c3ba02406665b9ee0743270c526be26 (patch)
treeb21d47e8362b3c38f8566f486fad287c6bc4aca5 /ui
parent2c2311c5451f4555e85077285233884e66f9ea33 (diff)
console: ignore ui_info updates which don't actually update something
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 1464597673-26464-1-git-send-email-kraxel@redhat.com
Diffstat (limited to 'ui')
-rw-r--r--ui/console.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/ui/console.c b/ui/console.c
index bf385790b5..ce1e10570f 100644
--- a/ui/console.c
+++ b/ui/console.c
@@ -1453,16 +1453,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;
}