diff src/video/x11/SDL_x11window.c @ 3760:64f346a83ed3 gsoc2008_manymouse

http://wilku.ravenlord.ws/doku.php?id=documentation for information how things work. Currently implemented: detecting many pointing devices and pressure detection. Still a bug. Each program has to be comipled with a flag -lXi
author Szymon Wilczek <kazeuser@gmail.com>
date Fri, 06 Jun 2008 15:23:29 +0000
parents c7bcf84ba1b9
children 3b5691f85c0d
line wrap: on
line diff
--- a/src/video/x11/SDL_x11window.c	Fri Jun 06 14:50:56 2008 +0000
+++ b/src/video/x11/SDL_x11window.c	Fri Jun 06 15:23:29 2008 +0000
@@ -153,6 +153,8 @@
     XSizeHints *sizehints;
     XWMHints *wmhints;
     XClassHint *classhints;
+    extern XEventClass SDL_XEvents[];
+    extern int SDL_NumOfXEvents;
 
 #if SDL_VIDEO_DRIVER_X11_XINERAMA
 /* FIXME
@@ -481,20 +483,24 @@
         Uint32 fevent = 0;
         pXGetICValues(((SDL_WindowData *) window->driverdata)->ic,
                       XNFilterEvents, &fevent, NULL);
+        XMapWindow(data->display,w);
         XSelectInput(data->display, w,
                      (FocusChangeMask | EnterWindowMask | LeaveWindowMask |
                       ExposureMask | ButtonPressMask | ButtonReleaseMask |
                       PointerMotionMask | KeyPressMask | KeyReleaseMask |
                       PropertyChangeMask | StructureNotifyMask |
                       KeymapStateMask | fevent));
+    XSelectExtensionEvent(data->display, w, SDL_XEvents, SDL_NumOfXEvents);
     }
 #else
+    XMapWindow(data->display,w);
     XSelectInput(data->display, w,
                  (FocusChangeMask | EnterWindowMask | LeaveWindowMask |
                   ExposureMask | ButtonPressMask | ButtonReleaseMask |
                   PointerMotionMask | KeyPressMask | KeyReleaseMask |
                   PropertyChangeMask | StructureNotifyMask |
                   KeymapStateMask));
+    XSelectExtensionEvent(data->display, w, SDL_XEvents, SDL_NumOfXEvents);
 #endif
 
     return 0;