mirror of
https://github.com/brl/mutter.git
synced 2024-09-21 06:56:12 -04:00
display: Rework event spewing
Make it a compile-time flag rather than a run-time flag, because practically any time you're going to be debugging event spewing, you're going to have to recompile anyway. Remove the WITH_VERBOSE_MODE checks, too.
This commit is contained in:
parent
9df8e831be
commit
49c0be11d6
@ -1295,10 +1295,6 @@ meta_get_display (void)
|
|||||||
return the_display;
|
return the_display;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef WITH_VERBOSE_MODE
|
|
||||||
static gboolean dump_events = TRUE;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
grab_op_is_mouse_only (MetaGrabOp op)
|
grab_op_is_mouse_only (MetaGrabOp op)
|
||||||
{
|
{
|
||||||
@ -2992,8 +2988,7 @@ meta_display_handle_xevent (MetaDisplay *display,
|
|||||||
MetaMonitorManager *monitor;
|
MetaMonitorManager *monitor;
|
||||||
MetaScreen *screen;
|
MetaScreen *screen;
|
||||||
|
|
||||||
#ifdef WITH_VERBOSE_MODE
|
#if 0
|
||||||
if (dump_events)
|
|
||||||
meta_spew_event (display, event);
|
meta_spew_event (display, event);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -3270,8 +3265,7 @@ event_get_time (MetaDisplay *display,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef WITH_VERBOSE_MODE
|
G_GNUC_UNUSED const char*
|
||||||
const char*
|
|
||||||
meta_event_detail_to_string (int d)
|
meta_event_detail_to_string (int d)
|
||||||
{
|
{
|
||||||
const char *detail = "???";
|
const char *detail = "???";
|
||||||
@ -3307,10 +3301,8 @@ meta_event_detail_to_string (int d)
|
|||||||
|
|
||||||
return detail;
|
return detail;
|
||||||
}
|
}
|
||||||
#endif /* WITH_VERBOSE_MODE */
|
|
||||||
|
|
||||||
#ifdef WITH_VERBOSE_MODE
|
G_GNUC_UNUSED const char*
|
||||||
const char*
|
|
||||||
meta_event_mode_to_string (int m)
|
meta_event_mode_to_string (int m)
|
||||||
{
|
{
|
||||||
const char *mode = "???";
|
const char *mode = "???";
|
||||||
@ -3332,10 +3324,8 @@ meta_event_mode_to_string (int m)
|
|||||||
|
|
||||||
return mode;
|
return mode;
|
||||||
}
|
}
|
||||||
#endif /* WITH_VERBOSE_MODE */
|
|
||||||
|
|
||||||
#ifdef WITH_VERBOSE_MODE
|
G_GNUC_UNUSED static const char*
|
||||||
static const char*
|
|
||||||
stack_mode_to_string (int mode)
|
stack_mode_to_string (int mode)
|
||||||
{
|
{
|
||||||
switch (mode)
|
switch (mode)
|
||||||
@ -3354,11 +3344,9 @@ stack_mode_to_string (int mode)
|
|||||||
|
|
||||||
return "Unknown";
|
return "Unknown";
|
||||||
}
|
}
|
||||||
#endif /* WITH_VERBOSE_MODE */
|
|
||||||
|
|
||||||
#ifdef HAVE_XSYNC
|
#ifdef HAVE_XSYNC
|
||||||
#ifdef WITH_VERBOSE_MODE
|
G_GNUC_UNUSED static gint64
|
||||||
static gint64
|
|
||||||
sync_value_to_64 (const XSyncValue *value)
|
sync_value_to_64 (const XSyncValue *value)
|
||||||
{
|
{
|
||||||
gint64 v;
|
gint64 v;
|
||||||
@ -3368,10 +3356,8 @@ sync_value_to_64 (const XSyncValue *value)
|
|||||||
|
|
||||||
return v;
|
return v;
|
||||||
}
|
}
|
||||||
#endif /* WITH_VERBOSE_MODE */
|
|
||||||
|
|
||||||
#ifdef WITH_VERBOSE_MODE
|
G_GNUC_UNUSED static const char*
|
||||||
static const char*
|
|
||||||
alarm_state_to_string (XSyncAlarmState state)
|
alarm_state_to_string (XSyncAlarmState state)
|
||||||
{
|
{
|
||||||
switch (state)
|
switch (state)
|
||||||
@ -3386,12 +3372,9 @@ alarm_state_to_string (XSyncAlarmState state)
|
|||||||
return "(unknown)";
|
return "(unknown)";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif /* WITH_VERBOSE_MODE */
|
|
||||||
|
|
||||||
#endif /* HAVE_XSYNC */
|
#endif /* HAVE_XSYNC */
|
||||||
|
|
||||||
#ifdef WITH_VERBOSE_MODE
|
G_GNUC_UNUSED static void
|
||||||
static void
|
|
||||||
meta_spew_xi2_event (MetaDisplay *display,
|
meta_spew_xi2_event (MetaDisplay *display,
|
||||||
XIEvent *input_event,
|
XIEvent *input_event,
|
||||||
const char **name_p,
|
const char **name_p,
|
||||||
@ -3451,7 +3434,7 @@ meta_spew_xi2_event (MetaDisplay *display,
|
|||||||
*extra_p = extra;
|
*extra_p = extra;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
G_GNUC_UNUSED static void
|
||||||
meta_spew_core_event (MetaDisplay *display,
|
meta_spew_core_event (MetaDisplay *display,
|
||||||
XEvent *event,
|
XEvent *event,
|
||||||
const char **name_p,
|
const char **name_p,
|
||||||
@ -3675,7 +3658,7 @@ meta_spew_core_event (MetaDisplay *display,
|
|||||||
*extra_p = extra;
|
*extra_p = extra;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
G_GNUC_UNUSED static void
|
||||||
meta_spew_event (MetaDisplay *display,
|
meta_spew_event (MetaDisplay *display,
|
||||||
XEvent *event)
|
XEvent *event)
|
||||||
{
|
{
|
||||||
@ -3685,9 +3668,6 @@ meta_spew_event (MetaDisplay *display,
|
|||||||
MetaScreen *screen;
|
MetaScreen *screen;
|
||||||
XIEvent *input_event;
|
XIEvent *input_event;
|
||||||
|
|
||||||
if (!meta_is_verbose())
|
|
||||||
return;
|
|
||||||
|
|
||||||
/* filter overnumerous events */
|
/* filter overnumerous events */
|
||||||
if (event->type == Expose || event->type == MotionNotify ||
|
if (event->type == Expose || event->type == MotionNotify ||
|
||||||
event->type == NoExpose)
|
event->type == NoExpose)
|
||||||
@ -3716,8 +3696,7 @@ meta_spew_event (MetaDisplay *display,
|
|||||||
else
|
else
|
||||||
winname = g_strdup_printf ("0x%lx", event->xany.window);
|
winname = g_strdup_printf ("0x%lx", event->xany.window);
|
||||||
|
|
||||||
meta_topic (META_DEBUG_EVENTS,
|
g_print ("%s on %s%s %s %sserial %lu\n", name, winname,
|
||||||
"%s on %s%s %s %sserial %lu\n", name, winname,
|
|
||||||
extra ? ":" : "", extra ? extra : "",
|
extra ? ":" : "", extra ? extra : "",
|
||||||
event->xany.send_event ? "SEND " : "",
|
event->xany.send_event ? "SEND " : "",
|
||||||
event->xany.serial);
|
event->xany.serial);
|
||||||
@ -3727,7 +3706,6 @@ meta_spew_event (MetaDisplay *display,
|
|||||||
if (extra)
|
if (extra)
|
||||||
g_free (extra);
|
g_free (extra);
|
||||||
}
|
}
|
||||||
#endif /* WITH_VERBOSE_MODE */
|
|
||||||
|
|
||||||
MetaWindow*
|
MetaWindow*
|
||||||
meta_display_lookup_x_window (MetaDisplay *display,
|
meta_display_lookup_x_window (MetaDisplay *display,
|
||||||
|
Loading…
Reference in New Issue
Block a user