[mutter] Adjust for API break in gdkkeysyms.h



commit 8a6b583cdcda3742bf31df9220c0256a838917b6
Author: Florian Müllner <fmuellner gnome org>
Date:   Thu Sep 9 17:01:52 2010 +0200

    Adjust for API break in gdkkeysyms.h
    
    The key symbols were renamed to avoid namespace conflicts with
    gobject-introspection.

 src/gdk-compat.h       |    6 ++++++
 src/tools/mutter-mag.c |    3 ++-
 2 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/src/gdk-compat.h b/src/gdk-compat.h
index 31991e8..501b4f4 100644
--- a/src/gdk-compat.h
+++ b/src/gdk-compat.h
@@ -15,4 +15,10 @@
 
 #endif /*GTK_CHECK_VERSION */
 
+
+/* Compatibility with old GDK key symbols */
+#ifndef GDK_KEY_Escape
+#define GDK_KEY_Escape GDK_Escape
+#endif /* GDK_KEY_Escape */
+
 #endif /* __GDK_COMPAT_H__ */
diff --git a/src/tools/mutter-mag.c b/src/tools/mutter-mag.c
index 23a0487..b45c538 100644
--- a/src/tools/mutter-mag.c
+++ b/src/tools/mutter-mag.c
@@ -28,6 +28,7 @@
 #include <unistd.h>
 #include <stdlib.h>
 #include <math.h>
+#include <gdk-compat.h>
 
 static GtkWidget *grab_widget = NULL;
 static GtkWidget *display_window = NULL;
@@ -191,7 +192,7 @@ key_press (GtkWidget   *invisible,
            GdkEventKey *event,
            gpointer     data)
 {  
-  if (event->keyval == GDK_Escape)
+  if (event->keyval == GDK_KEY_Escape)
     {
       shutdown_grab ();
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]