# HG changeset patch # User Szymon Wilczek # Date 1217848690 0 # Node ID 3b5691f85c0df6fc1711d2b1734cd38a99e65186 # Parent 9087a84cba511e91ed4b277474df89717cf5aed1 Further x11 code improvments + comments diff -r 9087a84cba51 -r 3b5691f85c0d src/events/SDL_mouse_c.h --- a/src/events/SDL_mouse_c.h Sat Aug 02 17:40:49 2008 +0000 +++ b/src/events/SDL_mouse_c.h Mon Aug 04 11:18:10 2008 +0000 @@ -56,6 +56,13 @@ /* Free the mouse when it's time */ void (*FreeMouse) (SDL_Mouse * mouse); + /*data common for tablets*/ + int pressure; + int pressure_max; + int pressure_min; + int tilt;/*for future use*/ + int rotation;/*for future use*/ + /* Data common to all mice */ SDL_WindowID focus; int which; @@ -64,11 +71,7 @@ int z;/*for future use*/ int xdelta; int ydelta; - int pressure; - int pressure_max; - int pressure_min; - int tilt;/*for future use*/ - int rotation;/*for future use*/ + char* name; Uint8 buttonstate; SDL_bool relative_mode; diff -r 9087a84cba51 -r 3b5691f85c0d src/video/x11/SDL_x11video.c --- a/src/video/x11/SDL_x11video.c Sat Aug 02 17:40:49 2008 +0000 +++ b/src/video/x11/SDL_x11video.c Mon Aug 04 11:18:10 2008 +0000 @@ -220,7 +220,7 @@ int X11_VideoInit(_THIS) { - int i,index=0,c_not_needed; + int i,index=0,event_code; XEventClass xEvent; SDL_VideoData *data = (SDL_VideoData *) _this->driverdata; @@ -250,90 +250,46 @@ return -1; } X11_InitMouse(_this); + /*we're generating the table of events that should be recognized*/ for(i=0;idisplay, w, SDL_XEvents, SDL_NumOfXEvents); } #else XMapWindow(data->display,w); @@ -500,8 +499,10 @@ PointerMotionMask | KeyPressMask | KeyReleaseMask | PropertyChangeMask | StructureNotifyMask | KeymapStateMask)); +#endif + + /*we're informing the display what extension events we want to receive from it*/ XSelectExtensionEvent(data->display, w, SDL_XEvents, SDL_NumOfXEvents); -#endif return 0; }