From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54581) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Woq3Q-0006nz-7S for qemu-devel@nongnu.org; Mon, 26 May 2014 04:14:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Woq3F-0006np-DQ for qemu-devel@nongnu.org; Mon, 26 May 2014 04:14:44 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55688) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Woq3F-0006nR-5G for qemu-devel@nongnu.org; Mon, 26 May 2014 04:14:33 -0400 From: Gerd Hoffmann Date: Mon, 26 May 2014 10:14:13 +0200 Message-Id: <1401092059-18503-19-git-send-email-kraxel@redhat.com> In-Reply-To: <1401092059-18503-1-git-send-email-kraxel@redhat.com> References: <1401092059-18503-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PULL 18/24] 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 We might have multiple graphic displays now which all need a cursor update. 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 91b6824..8215841 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