Mercurial > sdl-ios-xcode
comparison src/video/x11/SDL_x11video.c @ 444:406b12a17b15
Only modifier key state is noted when X11 window opens
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sun, 18 Aug 2002 03:19:59 +0000 |
parents | f6ffac90895c |
children | 8a687496061f |
comparison
equal
deleted
inserted
replaced
443:778b970cec12 | 444:406b12a17b15 |
---|---|
831 } | 831 } |
832 | 832 |
833 /* Update the internal keyboard state */ | 833 /* Update the internal keyboard state */ |
834 X11_SetKeyboardState(SDL_Display, NULL); | 834 X11_SetKeyboardState(SDL_Display, NULL); |
835 | 835 |
836 /* When the window is first mapped, ignore non-modifier keys */ | |
837 { | |
838 Uint8 *keys = SDL_GetKeyState(NULL); | |
839 for ( i = 0; i < SDLK_LAST; ++i ) { | |
840 switch (i) { | |
841 case SDLK_NUMLOCK: | |
842 case SDLK_CAPSLOCK: | |
843 case SDLK_LCTRL: | |
844 case SDLK_RCTRL: | |
845 case SDLK_LSHIFT: | |
846 case SDLK_RSHIFT: | |
847 case SDLK_LALT: | |
848 case SDLK_RALT: | |
849 case SDLK_LMETA: | |
850 case SDLK_RMETA: | |
851 case SDLK_MODE: | |
852 break; | |
853 default: | |
854 keys[i] = SDL_RELEASED; | |
855 break; | |
856 } | |
857 } | |
858 } | |
859 | |
836 /* Map them both and go fullscreen, if requested */ | 860 /* Map them both and go fullscreen, if requested */ |
837 if ( ! SDL_windowid ) { | 861 if ( ! SDL_windowid ) { |
838 XMapWindow(SDL_Display, SDL_Window); | 862 XMapWindow(SDL_Display, SDL_Window); |
839 XMapWindow(SDL_Display, WMwindow); | 863 XMapWindow(SDL_Display, WMwindow); |
840 X11_WaitMapped(this, WMwindow); | 864 X11_WaitMapped(this, WMwindow); |