comparison src/video/x11/SDL_x11events.c @ 2306:1a8bab15a45d

Fixed compile errors
author Sam Lantinga <slouken@libsdl.org>
date Thu, 07 Feb 2008 16:00:29 +0000
parents fbe8ff44c519
children 4ac07ae446d3
comparison
equal deleted inserted replaced
2305:fbe8ff44c519 2306:1a8bab15a45d
143 /* Has the keyboard layout changed? */ 143 /* Has the keyboard layout changed? */
144 case MappingNotify:{ 144 case MappingNotify:{
145 #ifdef DEBUG_XEVENTS 145 #ifdef DEBUG_XEVENTS
146 printf("MappingNotify!\n"); 146 printf("MappingNotify!\n");
147 #endif 147 #endif
148 X11_UpdateKeymap(this); 148 X11_UpdateKeymap(_this);
149 } 149 }
150 break; 150 break;
151 151
152 /* Mouse motion? */ 152 /* Mouse motion? */
153 case MotionNotify:{ 153 case MotionNotify:{
175 175
176 /* Key press? */ 176 /* Key press? */
177 case KeyPress:{ 177 case KeyPress:{
178 KeyCode keycode = xevent.xkey.keycode; 178 KeyCode keycode = xevent.xkey.keycode;
179 KeySym keysym = NoSymbol; 179 KeySym keysym = NoSymbol;
180 char text[sizeof(SDL_TEXTINPUTEVENT_TEXT_SIZE)]; 180 char text[SDL_TEXTINPUTEVENT_TEXT_SIZE];
181 Uint32 ucs4 = 0; 181 Uint32 ucs4 = 0;
182 182
183 #ifdef DEBUG_XEVENTS 183 #ifdef DEBUG_XEVENTS
184 printf("KeyPress (X11 keycode = 0x%X)\n", xevent.xkey.keycode); 184 printf("KeyPress (X11 keycode = 0x%X)\n", xevent.xkey.keycode);
185 #endif 185 #endif
197 XKeysymToString(keysym)); 197 XKeysymToString(keysym));
198 } 198 }
199 #endif 199 #endif
200 /* Xutf8LookupString(), works for Latin-1 */ 200 /* Xutf8LookupString(), works for Latin-1 */
201 SDL_zero(text); 201 SDL_zero(text);
202 XLookupString(&xevent, text, sizeof(text), &keysym, NULL); 202 XLookupString(&xevent.xkey, text, sizeof(text), &keysym, NULL);
203 if (*text) { 203 if (*text) {
204 printf("Sending text event %s\n", text); 204 printf("Sending text event %s\n", text);
205 SDL_SendKeyboardText(videodata->keyboard, text); 205 SDL_SendKeyboardText(videodata->keyboard, text);
206 } 206 }
207 } 207 }