Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 369020 Details for
Bug 499180
media-libs/libsdl-1.2.15-r4 randomly looses KEYUP events if an IME is active
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch corrected for an obvious problem
sdl-1.2-event_filter.patch (text/plain), 1.51 KB, created by
Rafał Mużyło
on 2014-01-29 01:37:17 UTC
(
hide
)
Description:
patch corrected for an obvious problem
Filename:
MIME Type:
Creator:
Rafał Mużyło
Created:
2014-01-29 01:37:17 UTC
Size:
1.51 KB
patch
obsolete
>--- src/video/x11/SDL_x11events.c 2012-01-19 07:30:06.000000000 +0100 >+++ src/video/x11/SDL_x11events.c 2014-01-02 16:43:19.998779078 +0100 >@@ -395,6 +395,8 @@ static int X11_DispatchEvent(_THIS) > { > int posted; > XEvent xevent; >+ int orig_event_type; >+ KeyCode orig_keycode; > > SDL_memset(&xevent, '\0', sizeof (XEvent)); /* valgrind fix. --ryan. */ > XNextEvent(SDL_Display, &xevent); >@@ -410,9 +412,29 @@ static int X11_DispatchEvent(_THIS) > #ifdef X_HAVE_UTF8_STRING > /* If we are translating with IM, we need to pass all events > to XFilterEvent, and discard those filtered events immediately. */ >+ orig_event_type = xevent.type; >+ if (orig_event_type == KeyPress || orig_event_type == KeyRelease) { >+ orig_keycode = xevent.xkey.keycode; >+ } else { >+ orig_keycode = 0; >+ } > if ( SDL_TranslateUNICODE > && SDL_IM != NULL > && XFilterEvent(&xevent, None) ) { >+ if (orig_keycode) { >+ SDL_keysym keysym; >+ static XComposeStatus state; >+ char keybuf[32]; >+ >+ keysym.scancode = xevent.xkey.keycode; >+ keysym.sym = X11_TranslateKeycode(SDL_Display, xevent.xkey.keycode); >+ keysym.mod = KMOD_NONE; >+ keysym.unicode = 0; >+ if (orig_event_type == KeyPress && XLookupString(&xevent.xkey, keybuf, sizeof(keybuf), NULL, &state)) >+ keysym.unicode = (Uint8)keybuf[0]; >+ >+ SDL_PrivateKeyboard(orig_event_type == KeyPress ? SDL_PRESSED : SDL_RELEASED, &keysym); >+ } > return 0; > } > #endif
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 499180
:
368658
| 369020