comparison 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
comparison
equal deleted inserted replaced
3759:064c178558b7 3760:64f346a83ed3
151 int x, y; 151 int x, y;
152 Window w; 152 Window w;
153 XSizeHints *sizehints; 153 XSizeHints *sizehints;
154 XWMHints *wmhints; 154 XWMHints *wmhints;
155 XClassHint *classhints; 155 XClassHint *classhints;
156 extern XEventClass SDL_XEvents[];
157 extern int SDL_NumOfXEvents;
156 158
157 #if SDL_VIDEO_DRIVER_X11_XINERAMA 159 #if SDL_VIDEO_DRIVER_X11_XINERAMA
158 /* FIXME 160 /* FIXME
159 if ( use_xinerama ) { 161 if ( use_xinerama ) {
160 x = xinerama_info.x_org; 162 x = xinerama_info.x_org;
479 #ifdef X_HAVE_UTF8_STRING 481 #ifdef X_HAVE_UTF8_STRING
480 { 482 {
481 Uint32 fevent = 0; 483 Uint32 fevent = 0;
482 pXGetICValues(((SDL_WindowData *) window->driverdata)->ic, 484 pXGetICValues(((SDL_WindowData *) window->driverdata)->ic,
483 XNFilterEvents, &fevent, NULL); 485 XNFilterEvents, &fevent, NULL);
486 XMapWindow(data->display,w);
484 XSelectInput(data->display, w, 487 XSelectInput(data->display, w,
485 (FocusChangeMask | EnterWindowMask | LeaveWindowMask | 488 (FocusChangeMask | EnterWindowMask | LeaveWindowMask |
486 ExposureMask | ButtonPressMask | ButtonReleaseMask | 489 ExposureMask | ButtonPressMask | ButtonReleaseMask |
487 PointerMotionMask | KeyPressMask | KeyReleaseMask | 490 PointerMotionMask | KeyPressMask | KeyReleaseMask |
488 PropertyChangeMask | StructureNotifyMask | 491 PropertyChangeMask | StructureNotifyMask |
489 KeymapStateMask | fevent)); 492 KeymapStateMask | fevent));
493 XSelectExtensionEvent(data->display, w, SDL_XEvents, SDL_NumOfXEvents);
490 } 494 }
491 #else 495 #else
496 XMapWindow(data->display,w);
492 XSelectInput(data->display, w, 497 XSelectInput(data->display, w,
493 (FocusChangeMask | EnterWindowMask | LeaveWindowMask | 498 (FocusChangeMask | EnterWindowMask | LeaveWindowMask |
494 ExposureMask | ButtonPressMask | ButtonReleaseMask | 499 ExposureMask | ButtonPressMask | ButtonReleaseMask |
495 PointerMotionMask | KeyPressMask | KeyReleaseMask | 500 PointerMotionMask | KeyPressMask | KeyReleaseMask |
496 PropertyChangeMask | StructureNotifyMask | 501 PropertyChangeMask | StructureNotifyMask |
497 KeymapStateMask)); 502 KeymapStateMask));
503 XSelectExtensionEvent(data->display, w, SDL_XEvents, SDL_NumOfXEvents);
498 #endif 504 #endif
499 505
500 return 0; 506 return 0;
501 } 507 }
502 508