qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 13/22] gtk: add gd_grab trace event


From: Gerd Hoffmann
Subject: [Qemu-devel] [PATCH 13/22] gtk: add gd_grab trace event
Date: Tue, 6 May 2014 14:05:49 +0200

Signed-off-by: Gerd Hoffmann <address@hidden>
---
 trace-events | 1 +
 ui/gtk.c     | 4 ++++
 2 files changed, 5 insertions(+)

diff --git a/trace-events b/trace-events
index 9b9d9d9..c93440d 100644
--- a/trace-events
+++ b/trace-events
@@ -1041,6 +1041,7 @@ ppm_save(const char *filename, void *display_surface) "%s 
surface=%p"
 gd_switch(const char *tab, int width, int height) "tab=%s, width=%d, height=%d"
 gd_update(const char *tab, int x, int y, int w, int h) "tab=%s, x=%d, y=%d, 
w=%d, h=%d"
 gd_key_event(const char *tab, int gdk_keycode, int qemu_keycode, const char 
*action) "tab=%s, translated GDK keycode %d to QEMU keycode %d (%s)"
+gd_grab(const char *tab, const char *device, bool on) "tab=%s, %s %d"
 
 # ui/input.c
 input_event_key_number(int conidx, int number, bool down) "con %d, key number 
0x%x, down %d"
diff --git a/ui/gtk.c b/ui/gtk.c
index c47f4ee..b251976 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)
-- 
1.8.3.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]