From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37751) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zbndk-0000Fk-8D for qemu-devel@nongnu.org; Tue, 15 Sep 2015 06:39:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zbnde-00068C-2d for qemu-devel@nongnu.org; Tue, 15 Sep 2015 06:39:08 -0400 Received: from mx1.redhat.com ([209.132.183.28]:55744) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zbndd-00067u-Ty for qemu-devel@nongnu.org; Tue, 15 Sep 2015 06:39:02 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id 8A4912F813D for ; Tue, 15 Sep 2015 10:39:01 +0000 (UTC) From: Gerd Hoffmann Date: Tue, 15 Sep 2015 12:38:51 +0200 Message-Id: <1442313535-4549-3-git-send-email-kraxel@redhat.com> In-Reply-To: <1442313535-4549-1-git-send-email-kraxel@redhat.com> References: <1442313535-4549-1-git-send-email-kraxel@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PULL 2/6] gtk: move gd_update_caption calls to gd_{grab, ungrab}_{pointer, keyboard} List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gerd Hoffmann Then we don't have to pair the grab/ungrab calls with update_caption calls any more because things happen automatically ;) Signed-off-by: Gerd Hoffmann Reviewed-by: Marc-Andr=C3=A9 Lureau --- ui/gtk.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/ui/gtk.c b/ui/gtk.c index 24a1edb..5f87475 100644 --- a/ui/gtk.c +++ b/ui/gtk.c @@ -856,7 +856,6 @@ static gboolean gd_button_event(GtkWidget *widget, Gd= kEventButton *button, TRUE); } else { gd_grab_pointer(vc); - gd_update_caption(s); } return TRUE; } @@ -1095,7 +1094,6 @@ static gboolean gd_win_grab(void *opaque) } else { gd_grab_pointer(vc); } - gd_update_caption(vc->s); return TRUE; } =20 @@ -1278,6 +1276,7 @@ static void gd_grab_keyboard(VirtualConsole *vc) GDK_CURRENT_TIME); #endif vc->s->kbd_owner =3D vc; + gd_update_caption(vc->s); trace_gd_grab(vc->label, "kbd", true); } =20 @@ -1295,6 +1294,7 @@ static void gd_ungrab_keyboard(GtkDisplayState *s) #else gdk_keyboard_ungrab(GDK_CURRENT_TIME); #endif + gd_update_caption(s); trace_gd_grab(vc->label, "kbd", false); } =20 @@ -1336,6 +1336,7 @@ static void gd_grab_pointer(VirtualConsole *vc) &vc->s->grab_x_root, &vc->s->grab_y_root, NU= LL); #endif vc->s->ptr_owner =3D vc; + gd_update_caption(vc->s); trace_gd_grab(vc->label, "ptr", true); } =20 @@ -1361,6 +1362,7 @@ static void gd_ungrab_pointer(GtkDisplayState *s) gtk_widget_get_screen(vc->gfx.drawing_area)= , vc->s->grab_x_root, vc->s->grab_y_root); #endif + gd_update_caption(s); trace_gd_grab(vc->label, "ptr", false); } =20 @@ -1377,7 +1379,6 @@ static void gd_menu_grab_input(GtkMenuItem *item, v= oid *opaque) gd_ungrab_pointer(s); } =20 - gd_update_caption(s); gd_update_cursor(vc); } =20 @@ -1432,7 +1433,6 @@ static gboolean gd_enter_event(GtkWidget *widget, G= dkEventCrossing *crossing, =20 if (gd_grab_on_hover(s)) { gd_grab_keyboard(vc); - gd_update_caption(s); } return TRUE; } @@ -1445,7 +1445,6 @@ static gboolean gd_leave_event(GtkWidget *widget, G= dkEventCrossing *crossing, =20 if (gd_grab_on_hover(s)) { gd_ungrab_keyboard(s); - gd_update_caption(s); } return TRUE; } --=20 1.8.3.1