diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2021-07-28 10:27:13 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2021-07-28 10:27:13 +0100 |
commit | f4fc10428424904caf2035cffc442195cb088b2c (patch) | |
tree | 72f320d5963e55586cfdeed2b14c72b8191b6327 /media-libs/libsdl/files/libsdl-1.2.15-SDL_EnableUNICODE.patch | |
parent | fbd9734cedfe790955100b8e4ab3613457d77b1a (diff) |
gentoo resync : 28.07.2021
Diffstat (limited to 'media-libs/libsdl/files/libsdl-1.2.15-SDL_EnableUNICODE.patch')
-rw-r--r-- | media-libs/libsdl/files/libsdl-1.2.15-SDL_EnableUNICODE.patch | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/media-libs/libsdl/files/libsdl-1.2.15-SDL_EnableUNICODE.patch b/media-libs/libsdl/files/libsdl-1.2.15-SDL_EnableUNICODE.patch deleted file mode 100644 index bf68b2e44f44..000000000000 --- a/media-libs/libsdl/files/libsdl-1.2.15-SDL_EnableUNICODE.patch +++ /dev/null @@ -1,47 +0,0 @@ - -diff -r 22a7f096bb9d -r 0aade9c0203f src/video/x11/SDL_x11events.c ---- a/src/video/x11/SDL_x11events.c Sun Dec 01 00:00:17 2013 -0500 -+++ b/src/video/x11/SDL_x11events.c Thu Apr 17 22:36:14 2014 -0700 -@@ -395,6 +395,8 @@ - { - 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 @@ - #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 - - - - |