From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: Gerd Hoffmann <kraxel@redhat.com>
Subject: [Qemu-devel] [PATCH 2/6] gtk: move gd_update_caption calls to gd_{grab, ungrab}_{pointer, keyboard}
Date: Wed, 9 Sep 2015 11:28:54 +0200 [thread overview]
Message-ID: <1441790938-29042-3-git-send-email-kraxel@redhat.com> (raw)
In-Reply-To: <1441790938-29042-1-git-send-email-kraxel@redhat.com>
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 <kraxel@redhat.com>
---
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, GdkEventButton *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;
}
@@ -1278,6 +1276,7 @@ static void gd_grab_keyboard(VirtualConsole *vc)
GDK_CURRENT_TIME);
#endif
vc->s->kbd_owner = vc;
+ gd_update_caption(vc->s);
trace_gd_grab(vc->label, "kbd", true);
}
@@ -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);
}
@@ -1336,6 +1336,7 @@ static void gd_grab_pointer(VirtualConsole *vc)
&vc->s->grab_x_root, &vc->s->grab_y_root, NULL);
#endif
vc->s->ptr_owner = vc;
+ gd_update_caption(vc->s);
trace_gd_grab(vc->label, "ptr", true);
}
@@ -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);
}
@@ -1377,7 +1379,6 @@ static void gd_menu_grab_input(GtkMenuItem *item, void *opaque)
gd_ungrab_pointer(s);
}
- gd_update_caption(s);
gd_update_cursor(vc);
}
@@ -1432,7 +1433,6 @@ static gboolean gd_enter_event(GtkWidget *widget, GdkEventCrossing *crossing,
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, GdkEventCrossing *crossing,
if (gd_grab_on_hover(s)) {
gd_ungrab_keyboard(s);
- gd_update_caption(s);
}
return TRUE;
}
--
1.8.3.1
next prev parent reply other threads:[~2015-09-09 9:29 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-09 9:28 [Qemu-devel] [PATCH 0/6] gtk: tweak grab handling, misc fixes Gerd Hoffmann
2015-09-09 9:28 ` [Qemu-devel] [PATCH 1/6] gtk: check for existing grabs in gd_grab_{pointer, keyboard} Gerd Hoffmann
2015-09-09 14:46 ` Marc-André Lureau
2015-09-09 9:28 ` Gerd Hoffmann [this message]
2015-09-09 14:47 ` [Qemu-devel] [PATCH 2/6] gtk: move gd_update_caption calls to gd_{grab, ungrab}_{pointer, keyboard} Marc-André Lureau
2015-09-09 9:28 ` [Qemu-devel] [PATCH 3/6] gtk: trace input grab reason Gerd Hoffmann
2015-09-09 14:53 ` Marc-André Lureau
2015-09-09 9:28 ` [Qemu-devel] [PATCH 4/6] gtk: set free_scale when setting zoom_fit Gerd Hoffmann
2015-09-09 14:57 ` Marc-André Lureau
2015-09-09 9:28 ` [Qemu-devel] [PATCH 5/6] gtk: don't grab input when entering fullscreen Gerd Hoffmann
2015-09-09 15:01 ` Marc-André Lureau
2015-09-09 9:28 ` [Qemu-devel] [PATCH 6/6] gtk: setlocale for LC_MESSAGES only Gerd Hoffmann
2015-09-09 9:48 ` Paolo Bonzini
2015-09-09 15:14 ` Marc-André Lureau
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1441790938-29042-3-git-send-email-kraxel@redhat.com \
--to=kraxel@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).