gnome-docker r18 - trunk/src



Author: hmacht
Date: Mon Jul  7 11:24:47 2008
New Revision: 18
URL: http://svn.gnome.org/viewvc/gnome-docker?rev=18&view=rev

Log:
use define instead of hard code


Modified:
   trunk/src/gd-input.c

Modified: trunk/src/gd-input.c
==============================================================================
--- trunk/src/gd-input.c	(original)
+++ trunk/src/gd-input.c	Mon Jul  7 11:24:47 2008
@@ -20,9 +20,12 @@
 #include "gd-notify.h"
 #include "gd-input.h"
 
+#define KEY_UNDOCK 207
+
 static GdkFilterReturn gdk_filter(GdkXEvent *xevent, GdkEvent *event, gpointer data)
 {
 	XEvent *ev = (XEvent*)xevent;
+	printf("filter: %d\n", ev->xkey.keycode);
 	if (ev->type != KeyPress)
 		return GDK_FILTER_CONTINUE;
 	if (ev->xkey.keycode == 207) {
@@ -47,7 +50,7 @@
 	root = GDK_WINDOW_XID(win);
 
 /*	XGrabKey(dpy, XKeysymToKeycode(dpy, XStringToKeysym("a")), AnyModifier,*/
-	XGrabKey(dpy, 207, AnyModifier,
+	XGrabKey(dpy, KEY_UNDOCK, AnyModifier,
 		 root, True, GrabModeAsync, GrabModeAsync);
 
 	gdk_window_add_filter(win, gdk_filter, NULL);



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