aboutsummaryrefslogtreecommitdiff
path: root/ui/gtk.c
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2014-05-06 10:43:52 +0200
committerGerd Hoffmann <kraxel@redhat.com>2014-05-26 08:41:03 +0200
commit1c856da57b29e41c73701f6f798589d50274b368 (patch)
tree31a20d5571c15f31d7a61ab55e4c1a201c53b46f /ui/gtk.c
parent74444bc1983bfe4cea794a5b4f2e6bc7ea5552ed (diff)
gtk: add gd_grab trace event
Input grab code is tricky, add some debug & trouble shooting aid. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'ui/gtk.c')
-rw-r--r--ui/gtk.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ui/gtk.c b/ui/gtk.c
index 3ee946523d..0e35abfea3 100644
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -1058,6 +1058,7 @@ static void gd_grab_keyboard(VirtualConsole *vc)
FALSE,
GDK_CURRENT_TIME);
#endif
+ trace_gd_grab(vc->label, "kbd", true);
}
static void gd_ungrab_keyboard(VirtualConsole *vc)
@@ -1080,6 +1081,7 @@ static void gd_ungrab_keyboard(VirtualConsole *vc)
#else
gdk_keyboard_ungrab(GDK_CURRENT_TIME);
#endif
+ trace_gd_grab(vc->label, "kbd", false);
}
static void gd_grab_pointer(VirtualConsole *vc)
@@ -1125,6 +1127,7 @@ static void gd_grab_pointer(VirtualConsole *vc)
gdk_display_get_pointer(display, NULL,
&vc->s->grab_x_root, &vc->s->grab_y_root, NULL);
#endif
+ trace_gd_grab(vc->label, "ptr", true);
}
static void gd_ungrab_pointer(VirtualConsole *vc)
@@ -1153,6 +1156,7 @@ static void gd_ungrab_pointer(VirtualConsole *vc)
gtk_widget_get_screen(vc->gfx.drawing_area),
vc->s->grab_x_root, vc->s->grab_y_root);
#endif
+ trace_gd_grab(vc->label, "ptr", false);
}
static void gd_menu_grab_input(GtkMenuItem *item, void *opaque)