From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51725) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Whe8a-00061X-9h for qemu-devel@nongnu.org; Tue, 06 May 2014 08:06:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Whe8R-0001aC-EV for qemu-devel@nongnu.org; Tue, 06 May 2014 08:06:20 -0400 Received: from mx1.redhat.com ([209.132.183.28]:64309) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Whe8R-0001ZX-5a for qemu-devel@nongnu.org; Tue, 06 May 2014 08:06:11 -0400 From: Gerd Hoffmann Date: Tue, 6 May 2014 14:05:54 +0200 Message-Id: <1399377958-20076-19-git-send-email-kraxel@redhat.com> In-Reply-To: <1399377958-20076-1-git-send-email-kraxel@redhat.com> References: <1399377958-20076-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PATCH 18/22] gtk: update all windows on mouse mode changes List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gerd Hoffmann , Anthony Liguori Signed-off-by: Gerd Hoffmann --- ui/gtk.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ui/gtk.c b/ui/gtk.c index 5b1af8b..3754246 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 **/ -- 1.8.3.1