|
c8881837
|
2015-05-28T19:06:07
|
|
Improved fix for bug 2096 - Mapping from scancode to keycode doesn't work for remapped modifier keys
Zack Middleton
The change to the keymap to use SDL_SCANCODE_TO_KEYCODE in SDL_x11keyboard.c causes all SDL scancodes without a Usc4 character to be XOR'd with SDLK_SCANCODE_MASK, but not all key code are suppose to be (as seen in include/SDL_keycodes.h). SDLK_BACKSPACE is not 0x4000002A.
I think the full list of keys affected are return, escape, backspace, tab, and delete.
|
|
6e67c949
|
2015-05-28T12:55:01
|
|
Fixed bug 2054 - SDL_GetError: "Unknown touch device"
Volumetric
The "Unknown touch device" message appears because the initial touch device setup loop uses SDL_GetTouch() as a guard for calling SDL_AddTouch(). SDL_GetTouch() will always report "Unknown touch device" since the device hasn't been added yet. The SDL_GetTouch() call is unnecessary since SDL_AddTouch() calls SDL_GetTouchIndex() to verify that the device hasn't been added yet, and SDL_GetTouchIndex() has the benefit of not reporting an error for a device it can't find.
|
|
32d6dcdb
|
2015-05-28T12:48:20
|
|
Fixed bug 2096 - Mapping from scancode to keycode doesn't work for remapped modifier keys
Jacob Lee
If a user has a non-standard keyboard mapping -- say, their caps lock key has been mapped to Ctrl -- then SDL_GetModState() is no longer accurate: it only considers the unmapped keys. This is a regression from SDL 1.2.
I think there are two parts to this bug: first, GetModState should use keycodes, rather than scancodes, which is easy enough.
Unfortunately, on my system, SDL considers Caps Lock, even when mapped as Control, to be both SDL_SCANCODE_CAPSLOCK and SDLK_CAPSLOCK. The output from checkkeys for it is:
INFO: Key pressed : scancode 57 = CapsLock, keycode 0x40000039 = CapsLock modifiers: CAPS
Whereas the output for xev is:
KeyPress event, serial 41, synthetic NO, window 0x4a00001,
root 0x9a, subw 0x0, time 40218333, (144,177), root:(1458,222),
state 0x10, keycode 66 (keysym 0xffe3, Control_L), same_screen YES,
XKeysymToKeycode returns keycode: 37
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
I think the problem is that X11_UpdateKeymap in SDL_x11keyboard.c only builds a mapping for keycodes associated with a Unicode character (anything where X11_KeyCodeToUcs returns a value). In the case of caps lock, SDL scancode 57 becomes x11 keycode 66, which becomes x11 keysym 65507(Control_L), which does not have a unicode value.
To fix this, I suspect that SDL needs a mapping of the rest of the x11 keysyms to their corresponding SDL key codes.
|
|
cb24f4de
|
2015-05-28T10:44:46
|
|
Fixed bug 2772 - SDL2 doesn't handle X KeymapNotify events
Jason Wyatt
Currently the keymapnotify event handling is commented out as FIXME in SDL_x11events.c (It looks like this may have functioned SDL1.2).
Not handling this event means that if a window manager shortcut such as ALT+SPACE is used, SDL will send an ALT key down signal, but not an up signal. Also querying SDL about the key state, it believes the ALT key remains pressed.
X passes the events keypress (alt), ?focusout?, ?focusin?, keymapnotify.
|
|
719bb6fc
|
2015-05-28T09:52:48
|
|
Fixed X11 build, added code to print initial modifiers to checkkeys
|
|
0694baf2
|
2015-05-28T09:33:47
|
|
Fixed bug 2736 - X11 doesn't set KMOD_NUM and KMOD_CAPS to system state
Zack Middleton
Using X11 (on Debian Wheezy), SDL_GetModState() & KMOD_NUM and KMOD_CAPS are not set to system state (numlock/capslock LEDs). Pressing numlock or capslock toggles the mod state, though if num/caps lock is enabled before starting the program it's still reversed from system state. This makes getting KMOD_NUM and KMOD_CAPS in programs unreliable. This can be seen using the checkkeys test program.
The function that appears to have handle this in SDL 1.2 is X11_SetKeyboardState. The function call is commented out with "FIXME:" in SDL 2.
Using Windows backend through WINE; on first key press if numlock and/or capslock is enabled on system, numlock/capslock SDL_SendKeyboardKey is run and toggles KMOD_NUM/KMOD_CAPS to the correct state. On X11 this does not happen.
The attached patch makes X11 backend set keyboard state on window focus if no window was previously focused. It sets all keys to system up/down state and toggles KMOD_NUM/KMOD_CAPS via SDL_SendKeyboardKey to match system if needed. The patch is based on SDL 1.2's X11_SetKeyboardState.
|
|
779d4035
|
2015-05-28T08:51:59
|
|
Fixed Windows build
|
|
0669a224
|
2015-05-28T08:41:07
|
|
Fixed bug 2860 - SetProp must be paired with RemoveProp especially for properties added to external windows
Coriiander
Upon creating a window, a window property is added to it through the Win32-function "SetProp". This is done in the SDL-function "SetupWindowData" in file "src\video\windows\SDL_windowswindow.c".
Whenever you call "SetProp" to add a property to a Win32-window, you should also call the Win32-function "RemoveProp" to remove it before destroying that Win32-window.
While you might think that it's ok and that Windows will clean up nicely itself, it is not ok. It is against all Win32-API guidelines and is mostlikely a leak. Especially on external windows (CreateWindowFrom) you want to have things done right, not messy and leaky, affecting some other module. Even if SDL gets shutdown entirely that external window will now forever still have the "SDL_WindowData" prop attached to it.
|
|
2a757825
|
2015-05-28T00:30:21
|
|
X11: Add Xdbe support to message boxes (thanks, Melker!).
Without this, message boxes with a lot of text will noticibly flicker as
you mouse over buttons.
Fixes Bugzilla #2343.
|
|
bea1854c
|
2015-05-27T19:00:56
|
|
Patched to compile on C89 compilers.
|
|
9c343681
|
2015-05-27T18:54:06
|
|
Wayland: Avoid NULL dereference after window destruction (thanks, "x414e54"!).
Fixes Bugzilla #2934.
|
|
80cfccbf
|
2015-05-26T22:57:42
|
|
Back out changeset b80349dd6d40.
This change didn't do what I thought it did, sorry.
|
|
c69a5592
|
2015-05-26T21:29:45
|
|
X11: generate clipboard update events (thanks, "chw"!).
Partially fixes Bugzilla #2266.
|
|
cc493d71
|
2015-05-26T21:26:27
|
|
X11: use XA_STRING for text SDL puts on the clipboard (thanks, "chw"!).
Partially fixes Bugzilla #2266.
|
|
262e8ef3
|
2015-05-26T21:51:47
|
|
Mac: Send a window resize event when the window's backing scale factor changes.
The backing scale factor can change when the window moves between retina and non-retina displays.
The only other way to detect such a change is to compare the output of SDL_GL_GetDrawableSize or SDL_GetRendererOutputSize every frame, which is less than desirable, especially since the necessary app logic is likely already being executed when a window resize event is received.
|
|
be89fa09
|
2015-05-26T20:49:27
|
|
Reset the keyboard state when launching a message box (thanks, Sean!).
Otherwise, pressed keys get stuck.
Fixes Bugzilla #2776.
|
|
41908548
|
2015-05-26T20:40:00
|
|
Windows: Alt-F4 hotkey should be checked on keydown, not keyup (thanks, Matt!).
Fixes Bugzilla #2780.
|
|
ae6555df
|
2015-05-26T20:22:14
|
|
Pump IBus events after X events.
|
|
a4f0daed
|
2015-05-26T19:34:56
|
|
EGL: OpenGL ES 3.0 contexts can now be created without the EGL_KHR_create_context extension.
Fixes bugzilla #2994.
|
|
80916e01
|
2015-05-26T11:38:04
|
|
Cocoa: Fixed relative mouse mode when app loses/regains focus (thanks, Eric!).
Fixes Bugzilla #2718.
|
|
b11b3493
|
2015-05-26T11:08:30
|
|
Windows: don't beep on Alt-* key combos (Thanks, historic_bruno!).
Fixes Bugzilla 2669.
|
|
bb437f02
|
2015-05-26T11:01:19
|
|
Cocoa: report SDL_WINDOWEVENT_EXPOSED events to the app (thanks, David!).
Fixes Bugzilla #2644.
|
|
aba4d783
|
2015-05-26T10:25:15
|
|
Don't look for (and fail without) glGetIntegerv() until we need to.
Fixes Bugzilla #2615.
|
|
22704ac2
|
2015-05-26T09:55:41
|
|
Cocoa: don't fail outright if we see an unknown display format.
Just treat it as ARGB8888.
|
|
2c4a6ea0
|
2015-05-26T06:27:46
|
|
Updated the copyright year to 2015
|
|
240a3fbf
|
2015-05-16T16:55:56
|
|
iOS: Added support for SDL_DisableScreenSaver and SDL_EnableScreenSaver.
|
|
a54d038b
|
2015-05-16T21:15:27
|
|
Emscripten: Fixed wrong source comment and updated web link.
|
|
afc97cbd
|
2015-05-14T14:40:56
|
|
Fix duplicate raw mouse events with XInput2
Make XGrabPointer calls in X11_SetWindowGrab and X11_CaptureMouse
consistent by passing False to owner_mask along with proper event_mask.
|
|
1c6ea0f2
|
2015-05-13T22:39:32
|
|
Added a userdata parameter to SDL_SetWindowsMessageHook()
|
|
7de242e7
|
2015-05-13T22:39:20
|
|
Added SDL_SetWindowsMessageHook() to facilitate full IME support on Windows
|
|
f1a7c00d
|
2015-05-11T21:03:36
|
|
Refactored SDL_EGL_CreateContext: It now supports context flags and OpenGL ES 3+ contexts, and its behavior more closely matches the GLX and WGL context creation code.
Improved the code style consistency of SDL_egl.c.
Fixes bugzilla #2865.
|
|
3f51758e
|
2015-05-06T21:10:48
|
|
Emscripten: Fixed touch coordinates not being normalized.
|
|
ac27b511
|
2015-05-06T12:54:51
|
|
Fixed SDL_GL_GetAttribute queries for framebuffer component sizes in Core Profile OpenGL contexts.
Fixes bugzilla #2060.
|
|
4fc40266
|
2015-05-05T19:01:55
|
|
Replaced all remaining uses of NSAutoreleasePool with @autoreleasepool blocks (bugzilla #2680.)
|
|
d1372bb9
|
2015-05-05T16:20:11
|
|
Fixed the window offset on iOS when resuming an app with a borderless or fullscreen window that has the on-screen keyboard visible.
|
|
d603bb30
|
2015-05-05T16:16:10
|
|
Fixed a crash on iOS when none of the orientations in Info.plist match the SDL window's actual orientation.
Fixes bug #2967.
|
|
74d83ead
|
2015-05-04T21:47:40
|
|
Fixed bug 2976 - Fix RGBA<->RGBA blit that was broken with the optimization from Bug 11
id.zeta
The optimization from Bug 11 added a code branch on cases where the source RGB masks match the destination RGB masks and a optimized blit function Blit4to4MaskAlpha that always overrides the source alpha info would be chosen. Unfortunately, the branch also errorneously took over the RGBA<->RGBA blitting cases where the source alpha info should be copied, while they would instead get overriden in Blit4to4MaskAlpha.
The attached patch fixes that by handling the RGBA<->RGBA cases correctly in that branch with the original BlitNtoNCopyAlpha as well as uses an optimized Blit4to4CopyAlpha along the same vein.
|
|
589c46dd
|
2015-05-01T01:20:28
|
|
X11: send keypress events before textinput events.
|
|
d9d1a1b9
|
2015-04-26T13:53:46
|
|
X11: Use our own cut-buffer for intermediate clipboard storage.
XA_CUTBUFFER0 is not defined for holding UTF8 strings.
|
|
b72938c8
|
2015-04-20T12:22:44
|
|
Windows: Always set the system timer resolution to 1ms by default.
An existing hint lets apps that don't need the timer resolution changed avoid
this, to save battery, etc, but this fixes several problems in timing, audio
callbacks not firing fast enough, etc.
Fixes Bugzilla #2944.
|
|
a6df21cd
|
2014-12-20T11:45:39
|
|
Partial fix for bug 2726 - Win32 'mouse' events not applying 'SDL_TOUCH_MOUSEID'
This is a Win32-specific fix for bug 2726. A WinRT fix for this bug was applied
separately, via https://hg.libsdl.org/SDL/rev/91f56dcad879
This fix applies SDL_TOUCH_MOUSEID to 'mouse' events coming from touch devices,
but only when relative-mouse-mode is turned OFF. This bug is still present
when relative-mouse-mode is ON, however Microsoft does not provide documentation
on whether or not those input events (which come from WM_INPUT) can be
identified as touch-specific or not. Unofficially, that data might be available
(via GetMessageExtraInfo()), however this patch only uses MS-documented APIs.
|