Mercurial > sdl-ios-xcode
diff src/video/x11/SDL_x11window.c @ 4465:3e69e077cb95
Removed multi-mouse / multi-keyboard support in anticipation of a real multi-mouse and multi-touch API.
Plus, this lets me start implementing cursor support.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sun, 09 May 2010 20:47:22 -0700 |
parents | f7b03b6838cb |
children | f78a602ac135 |
line wrap: on
line diff
--- a/src/video/x11/SDL_x11window.c Sun May 09 19:55:28 2010 -0700 +++ b/src/video/x11/SDL_x11window.c Sun May 09 20:47:22 2010 -0700 @@ -22,6 +22,7 @@ #include "SDL_config.h" #include "../SDL_sysvideo.h" +#include "../SDL_pixels_c.h" #include "../../events/SDL_keyboard_c.h" #include "../../events/SDL_mouse_c.h" @@ -34,6 +35,7 @@ #include "SDL_x11opengles.h" #endif +#include "SDL_timer.h" #include "SDL_syswm.h" #define _NET_WM_STATE_REMOVE 0l @@ -67,7 +69,6 @@ int numwindows = videodata->numwindows; int windowlistlength = videodata->windowlistlength; SDL_WindowData **windowlist = videodata->windowlist; - int index; /* Allocate the window data */ data = (SDL_WindowData *) SDL_calloc(1, sizeof(*data)); @@ -275,8 +276,7 @@ if (visual->class == PseudoColor) { printf("asking for PseudoColor\n"); - Status status; - XStandardColormap cmap; +/* Status status; */ XColor *colorcells; Colormap colormap; Sint32 pix; @@ -387,7 +387,6 @@ } } else if (visual->class == DirectColor) { Status status; - XStandardColormap cmap; XColor *colorcells; Colormap colormap; int i; @@ -397,9 +396,9 @@ int rshift, gshift, bshift; /* Is the colormap we need already registered in SDL? */ - if (colormap = - X11_LookupColormap(data->display, - displaydata->screen, visual->visualid)) { + if ((colormap = + X11_LookupColormap(data->display, + displaydata->screen, visual->visualid))) { xattr.colormap = colormap; /* printf("found existing colormap\n"); */ } else { @@ -647,7 +646,6 @@ /* Tell KDE to keep fullscreen windows on top */ if (window->flags & SDL_WINDOW_FULLSCREEN) { XEvent ev; - long mask; SDL_zero(ev); ev.xclient.type = ClientMessage; @@ -710,32 +708,6 @@ } #endif -#if SDL_VIDEO_DRIVER_X11_XINPUT - /* we're informing the display what extension events we want to receive from it */ - { - int i, j, n = 0; - XEventClass xevents[256]; - - for (i = 0; i < SDL_GetNumMice(); ++i) { - SDL_Mouse *mouse; - X11_MouseData *data; - - mouse = SDL_GetMouse(i); - data = (X11_MouseData *) mouse->driverdata; - if (!data) { - continue; - } - - for (j = 0; j < data->num_xevents; ++j) { - xevents[n++] = data->xevents[j]; - } - } - if (n > 0) { - XSelectExtensionEvent(data->display, w, xevents, n); - } - } -#endif - return 0; } @@ -869,8 +841,6 @@ X11_SetWindowPosition(_THIS, SDL_Window * window) { SDL_WindowData *data = (SDL_WindowData *) window->driverdata; - SDL_DisplayData *displaydata = - (SDL_DisplayData *) window->display->driverdata; Display *display = data->videodata->display; int x, y;