diff src/events.c @ 462:0784d089fdc9 r21-2-46

Import from CVS: tag r21-2-46
author cvs
date Mon, 13 Aug 2007 11:44:37 +0200
parents 576fb035e263
children 7039e6323819
line wrap: on
line diff
--- a/src/events.c	Mon Aug 13 11:43:25 2007 +0200
+++ b/src/events.c	Mon Aug 13 11:44:37 2007 +0200
@@ -30,6 +30,7 @@
 #include "console-tty.h" /* for stuff in character_to_event */
 #include "device.h"
 #include "console-x.h"	/* for x_event_name prototype */
+#include "console-gtk.h" /* for gtk_event_name prototype */
 #include "extents.h"	/* Just for the EXTENTP abort check... */
 #include "events.h"
 #include "frame.h"
@@ -268,6 +269,12 @@
       {
 	struct console *con = XCONSOLE (CDFW_CONSOLE (e1->channel));
 
+#ifdef HAVE_GTK
+ 	if (CONSOLE_GTK_P (con))
+	  return (!memcmp (&e1->event.magic.underlying_gdk_event,
+			   &e2->event.magic.underlying_gdk_event,
+			   sizeof (GdkEvent)));
+#endif
 #ifdef HAVE_X_WINDOWS
 	if (CONSOLE_X_P (con))
 	  return (e1->event.magic.underlying_x_event.xany.serial ==
@@ -338,6 +345,10 @@
     case magic_event:
       {
 	struct console *con = XCONSOLE (CDFW_CONSOLE (EVENT_CHANNEL (e)));
+#ifdef HAVE_GTK
+ 	if (CONSOLE_GTK_P (con))
+ 	  return HASH2 (hash, e->event.magic.underlying_gdk_event.type);
+#endif
 #ifdef HAVE_X_WINDOWS
 	if (CONSOLE_X_P (con))
 	  return HASH2 (hash, e->event.magic.underlying_x_event.xany.serial);
@@ -1269,6 +1280,13 @@
       {
         const char *name = NULL;
 
+#ifdef HAVE_GTK
+ 	{
+ 	  Lisp_Object console = CDFW_CONSOLE (EVENT_CHANNEL (event));
+ 	  if (CONSOLE_GTK_P (XCONSOLE (console)))
+ 	    name = gtk_event_name (event->event.magic.underlying_gdk_event.type);
+ 	}
+#endif
 #ifdef HAVE_X_WINDOWS
 	{
 	  Lisp_Object console = CDFW_CONSOLE (EVENT_CHANNEL (event));