summaryrefslogtreecommitdiff
path: root/ui/gtk.c
diff options
context:
space:
mode:
authorStefan Weil <sw@weilnetz.de>2013-11-10 16:24:02 +0100
committerMichael Tokarev <mjt@tls.msk.ru>2013-12-02 21:02:00 +0400
commitef0dd982cb7dbff3ea234fe48187d556e69d6765 (patch)
treef9a017815944c83245304a002723ec4ff7f26285 /ui/gtk.c
parent5d28b0e960cd3a99f7e013900a0e12468720b402 (diff)
downloadqemu-ef0dd982cb7dbff3ea234fe48187d556e69d6765.tar.gz
qemu-ef0dd982cb7dbff3ea234fe48187d556e69d6765.tar.bz2
qemu-ef0dd982cb7dbff3ea234fe48187d556e69d6765.zip
gtk: Replace conditional debug messages by trace methods
Signed-off-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Diffstat (limited to 'ui/gtk.c')
-rw-r--r--ui/gtk.c19
1 files changed, 5 insertions, 14 deletions
diff --git a/ui/gtk.c b/ui/gtk.c
index b5f4f0bd40..6316f5ba00 100644
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -53,6 +53,7 @@
#include <vte/vte.h>
#include <math.h>
+#include "trace.h"
#include "ui/console.h"
#include "sysemu/sysemu.h"
#include "qmp-commands.h"
@@ -60,14 +61,6 @@
#include "keymaps.h"
#include "sysemu/char.h"
-//#define DEBUG_GTK
-
-#ifdef DEBUG_GTK
-#define DPRINTF(fmt, ...) printf(fmt, ## __VA_ARGS__)
-#else
-#define DPRINTF(fmt, ...) do { } while (0)
-#endif
-
#define MAX_VCS 10
@@ -302,7 +295,7 @@ static void gd_update(DisplayChangeListener *dcl,
int fbw, fbh;
int ww, wh;
- DPRINTF("update(x=%d, y=%d, w=%d, h=%d)\n", x, y, w, h);
+ trace_gd_update(x, y, w, h);
if (s->convert) {
pixman_image_composite(PIXMAN_OP_SRC, s->ds->image, NULL, s->convert,
@@ -396,8 +389,7 @@ static void gd_switch(DisplayChangeListener *dcl,
GtkDisplayState *s = container_of(dcl, GtkDisplayState, dcl);
bool resized = true;
- DPRINTF("resize(width=%d, height=%d)\n",
- surface_width(surface), surface_height(surface));
+ trace_gd_switch(surface_width(surface), surface_height(surface));
if (s->surface) {
cairo_surface_destroy(s->surface);
@@ -732,9 +724,8 @@ static gboolean gd_key_event(GtkWidget *widget, GdkEventKey *key, void *opaque)
qemu_keycode = 0;
}
- DPRINTF("translated GDK keycode %d to QEMU keycode %d (%s)\n",
- gdk_keycode, qemu_keycode,
- (key->type == GDK_KEY_PRESS) ? "down" : "up");
+ trace_gd_key_event(gdk_keycode, qemu_keycode,
+ (key->type == GDK_KEY_PRESS) ? "down" : "up");
for (i = 0; i < ARRAY_SIZE(modifier_keycode); i++) {
if (qemu_keycode == modifier_keycode[i]) {