GDK W32: Print more debug info about events

1) Print timestamps for events
2) Print wParam and lParam (in hex form) for messages

https://bugzilla.gnome.org/show_bug.cgi?id=763913
This commit is contained in:
Руслан Ижбулатов 2016-03-19 11:59:13 +00:00
parent 24d2f85b23
commit c4c00299b2

View File

@ -278,10 +278,11 @@ _gdk_win32_window_procedure (HWND hwnd,
{ {
LRESULT retval; LRESULT retval;
GDK_NOTE (EVENTS, g_print ("%s%*s%s %p", GDK_NOTE (EVENTS, g_print ("%s%*s%s %p %#x %#lx",
(debug_indent > 0 ? "\n" : ""), (debug_indent > 0 ? "\n" : ""),
debug_indent, "", debug_indent, "",
_gdk_win32_message_to_string (message), hwnd)); _gdk_win32_message_to_string (message), hwnd,
wparam, lparam));
debug_indent += 2; debug_indent += 2;
retval = inner_window_procedure (hwnd, message, wparam, lparam); retval = inner_window_procedure (hwnd, message, wparam, lparam);
debug_indent -= 2; debug_indent -= 2;
@ -679,7 +680,9 @@ _gdk_win32_print_event (const GdkEvent *event)
default: g_assert_not_reached (); default: g_assert_not_reached ();
} }
g_print (" %p ", event->any.window ? GDK_WINDOW_HWND (event->any.window) : NULL); g_print (" %p @ %ums ",
event->any.window ? GDK_WINDOW_HWND (event->any.window) : NULL,
gdk_event_get_time (event));
switch (event->any.type) switch (event->any.type)
{ {