[gimp/gtk3-port: 202/226] app: gimp_print_event(): add the device to the event debug output.
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gtk3-port: 202/226] app: gimp_print_event(): add the device to the event debug output.
- Date: Thu, 2 Jan 2014 19:35:25 +0000 (UTC)
commit 6c25c3e071b3475bada94be8d08ff7bf0311c4d1
Author: Michael Natterer <mitch gimp org>
Date: Sun Feb 27 15:59:07 2011 +0100
app: gimp_print_event(): add the device to the event debug output.
app/widgets/gimpwidgets-utils.c | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
---
diff --git a/app/widgets/gimpwidgets-utils.c b/app/widgets/gimpwidgets-utils.c
index 0effd92..1490a0f 100644
--- a/app/widgets/gimpwidgets-utils.c
+++ b/app/widgets/gimpwidgets-utils.c
@@ -1211,15 +1211,18 @@ const gchar *
gimp_print_event (const GdkEvent *event)
{
gchar *str;
+ gchar *tmp;
switch (event->type)
{
case GDK_ENTER_NOTIFY:
- str = g_strdup ("ENTER_NOTIFY");
+ str = g_strdup_printf ("ENTER_NOTIFY (mode %d)",
+ event->crossing.mode);
break;
case GDK_LEAVE_NOTIFY:
- str = g_strdup ("LEAVE_NOTIFY");
+ str = g_strdup_printf ("LEAVE_NOTIFY (mode %d)",
+ event->crossing.mode);
break;
case GDK_PROXIMITY_IN:
@@ -1297,6 +1300,13 @@ gimp_print_event (const GdkEvent *event)
break;
}
+ tmp = g_strdup_printf ("%s (device '%s', source device '%s')",
+ str,
+ gdk_device_get_name (gdk_event_get_device (event)),
+ gdk_device_get_name (gdk_event_get_source_device (event)));
+ g_free (str);
+ str = tmp;
+
g_idle_add (gimp_print_event_free, str);
return str;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]