summaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2014-05-06 11:48:28 +0200
committerGerd Hoffmann <kraxel@redhat.com>2014-05-26 08:41:03 +0200
commit99623c90d14d3112b88ace3ed0abded915c9116e (patch)
treec29a9b1402e8d0136f9f1470c200b2c072413a7f /ui
parent2884cf5b934808f547b5268a51be631805c25857 (diff)
downloadqemu-99623c90d14d3112b88ace3ed0abded915c9116e.tar.gz
gtk: update all windows on mouse mode changes
We might have multiple graphic displays now which all need a cursor update. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'ui')
-rw-r--r--ui/gtk.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/ui/gtk.c b/ui/gtk.c
index 91b68241e3..8215841067 100644
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -553,6 +553,7 @@ static void gd_change_runstate(void *opaque, int running, RunState state)
static void gd_mouse_mode_change(Notifier *notify, void *data)
{
GtkDisplayState *s;
+ int i;
s = container_of(notify, GtkDisplayState, mouse_mode_notifier);
/* release the grab at switching to absolute mode */
@@ -560,7 +561,10 @@ static void gd_mouse_mode_change(Notifier *notify, void *data)
gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(s->grab_item),
FALSE);
}
- gd_update_cursor(gd_vc_find_current(s));
+ for (i = 0; i < s->nb_vcs; i++) {
+ VirtualConsole *vc = &s->vc[i];
+ gd_update_cursor(vc);
+ }
}
/** GTK Events **/