Mercurial > sdl-ios-xcode
comparison src/video/x11/SDL_x11video.c @ 4014:a6264945ac52 SDL-1.2
Fixed compiler warning (gcc w/ -Wall) for unused variable, and checked for
error return code too.
author | Ryan C. Gordon <icculus@icculus.org> |
---|---|
date | Sun, 08 Jul 2007 01:35:50 +0000 |
parents | a19fd8bcdd52 |
children | 3f93ccc2c01e |
comparison
equal
deleted
inserted
replaced
4013:5804139bdf0b | 4014:a6264945ac52 |
---|---|
536 xlib specification allows IM to change the event requirement | 536 xlib specification allows IM to change the event requirement |
537 with its own circumstances, it is safe to call SelectInput | 537 with its own circumstances, it is safe to call SelectInput |
538 whenever we re-create an IC. */ | 538 whenever we re-create an IC. */ |
539 unsigned long mask = 0; | 539 unsigned long mask = 0; |
540 char *ret = pXGetICValues(SDL_IC, XNFilterEvents, &mask, NULL); | 540 char *ret = pXGetICValues(SDL_IC, XNFilterEvents, &mask, NULL); |
541 XSelectInput(SDL_Display, WMwindow, app_event_mask | mask); | 541 if (ret != NULL) { |
542 XSetICFocus(SDL_IC); | 542 XUnsetICFocus(SDL_IC); |
543 XDestroyIC(SDL_IC); | |
544 SDL_IC = NULL; | |
545 SDL_SetError("no input context could be created"); | |
546 XCloseIM(SDL_IM); | |
547 SDL_IM = NULL; | |
548 } else { | |
549 XSelectInput(SDL_Display, WMwindow, app_event_mask | mask); | |
550 XSetICFocus(SDL_IC); | |
551 } | |
543 } | 552 } |
544 } | 553 } |
545 } | 554 } |
546 #endif | 555 #endif |
547 | 556 |