Fix crash on X servers without UTF-8 support.
This commit is contained in:
parent
ad2a21d404
commit
9f84d0e002
1 changed files with 9 additions and 17 deletions
|
@ -265,6 +265,7 @@ X11_CreateWindow(_THIS, SDL_Window * window)
|
||||||
Atom _NET_WM_WINDOW_TYPE_NORMAL;
|
Atom _NET_WM_WINDOW_TYPE_NORMAL;
|
||||||
int wmstate_count;
|
int wmstate_count;
|
||||||
Atom wmstate_atoms[3];
|
Atom wmstate_atoms[3];
|
||||||
|
Uint32 fevent = 0;
|
||||||
|
|
||||||
#if SDL_VIDEO_DRIVER_X11_XINERAMA
|
#if SDL_VIDEO_DRIVER_X11_XINERAMA
|
||||||
/* FIXME
|
/* FIXME
|
||||||
|
@ -554,27 +555,18 @@ X11_CreateWindow(_THIS, SDL_Window * window)
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef X_HAVE_UTF8_STRING
|
#ifdef X_HAVE_UTF8_STRING
|
||||||
{
|
if (SDL_X11_HAVE_UTF8) {
|
||||||
Uint32 fevent = 0;
|
|
||||||
pXGetICValues(((SDL_WindowData *) window->driverdata)->ic,
|
pXGetICValues(((SDL_WindowData *) window->driverdata)->ic,
|
||||||
XNFilterEvents, &fevent, NULL);
|
XNFilterEvents, &fevent, NULL);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
XSelectInput(display, w,
|
XSelectInput(display, w,
|
||||||
(FocusChangeMask | EnterWindowMask | LeaveWindowMask |
|
(FocusChangeMask | EnterWindowMask | LeaveWindowMask |
|
||||||
ExposureMask | ButtonPressMask | ButtonReleaseMask |
|
ExposureMask | ButtonPressMask | ButtonReleaseMask |
|
||||||
PointerMotionMask | KeyPressMask | KeyReleaseMask |
|
PointerMotionMask | KeyPressMask | KeyReleaseMask |
|
||||||
PropertyChangeMask | StructureNotifyMask |
|
PropertyChangeMask | StructureNotifyMask |
|
||||||
KeymapStateMask | fevent));
|
KeymapStateMask | fevent));
|
||||||
}
|
|
||||||
#else
|
|
||||||
{
|
|
||||||
XSelectInput(display, w,
|
|
||||||
(FocusChangeMask | EnterWindowMask | LeaveWindowMask |
|
|
||||||
ExposureMask | ButtonPressMask | ButtonReleaseMask |
|
|
||||||
PointerMotionMask | KeyPressMask | KeyReleaseMask |
|
|
||||||
PropertyChangeMask | StructureNotifyMask |
|
|
||||||
KeymapStateMask));
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
XFlush(display);
|
XFlush(display);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue