diff src/video/x11/SDL_x11window.c @ 2710:44e49d3fa6cf

Final merge of Google Summer of Code 2008 work... Many-mouse and tablet support by Szymon Wilczek, mentored by Ryan C. Gordon Everything concerning the project is noted on the wiki: http://wilku.ravenlord.ws/doku.php?id=start
author Sam Lantinga <slouken@libsdl.org>
date Mon, 25 Aug 2008 06:33:00 +0000
parents c7bcf84ba1b9
children abacf2555bb4
line wrap: on
line diff
--- a/src/video/x11/SDL_x11window.c	Mon Aug 25 05:30:28 2008 +0000
+++ b/src/video/x11/SDL_x11window.c	Mon Aug 25 06:33:00 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,6 +483,7 @@
         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 |
@@ -489,6 +492,7 @@
                       KeymapStateMask | fevent));
     }
 #else
+    XMapWindow(data->display, w);
     XSelectInput(data->display, w,
                  (FocusChangeMask | EnterWindowMask | LeaveWindowMask |
                   ExposureMask | ButtonPressMask | ButtonReleaseMask |
@@ -497,6 +501,9 @@
                   KeymapStateMask));
 #endif
 
+    /* we're informing the display what extension events we want to receive from it */
+    XSelectExtensionEvent(data->display, w, SDL_XEvents, SDL_NumOfXEvents);
+
     return 0;
 }