Commit Graph

25 Commits

Author SHA1 Message Date
Ryan C. Gordon
b3f94acbf9 linux: Simplify D-Bus interface, remove lots of boilerplate. 2017-05-28 07:11:52 -04:00
Sam Lantinga
cf31ea1478 Fixed bug 3583 - X11 touch device can be permanently lost
Volumetric

In X11 the SDL error "Unknown touch device" can occur after which the application stops recognizing touch events. For a kiosk-type application this results in a hang as far as the user is concerned. This is reproducible on HP Z220/Z230/Z240 workstations by swapping USB cables for a while and it also occurs with no physical changes, probably due to USB device power management. A workaround is to make SDL re-enumerate the touch devices like it does at startup. A patch is attached.
2017-02-11 11:14:48 -08:00
Sam Lantinga
45b774e3f7 Updated copyright for 2017 2017-01-01 18:33:28 -08:00
Alex Baines
5fe984978c Fix double events / no repeat flag on key events when built withoutibus/fcitx
Uses XkbSetDetectableKeyRepeat, and falls back to forcing @im=none if it's not
supported.
2016-10-28 01:28:58 +01:00
Philipp Wiesemann
f6bcfa0175 X11: Fixed compile warning about unused variable. 2016-10-12 23:38:31 +02:00
Alex Baines
d9e3972acb Fix invalid read from poor setlocale usage. 2016-10-03 15:31:11 +01:00
Sam Lantinga
42f85aa29e Fixed building and using fcitx IME support on Linux 2016-10-08 11:30:07 -07:00
Sam Lantinga
fa0f417631 Fixed build warnings and errors 2016-10-01 14:48:18 -07:00
Alex Baines
7543092add Call setlocale + XSetModifiers before XOpenIM, Work around ibus+xim duplicate events. 2015-09-30 04:16:09 +01:00
Ryan C. Gordon
4f4c4b629f Added SDL_SetWindowResizable(). (thanks, Ethan!) 2016-09-29 22:52:41 -04:00
Ryan C. Gordon
02f49fdb53 x11: Deal with window borders better.
- Cache the _NET_FRAME_EXTENTS data locally, so we don't have to query
the X server for them (instead, we update our cached data when PropertyNotify
events alert us to a change).

- Use our cached extents for X11_GetWindowBordersSize(), so it's a fast call.

- Window position was meant to refer to the client area, not the window
decorations, so adjust appropriately when getting/setting the position.
2016-03-04 18:47:19 -05:00
Ryan C. Gordon
dc532c70e8 Added SDL_WINDOWEVENT_TAKE_FOCUS.
This is for corner cases where a multi-window app is activated and wants to
make a decision about where focus should go.

This patch came from Unreal Engine 4's fork of SDL, compliments of Epic Games.
2016-01-05 02:27:50 -05:00
Ryan C. Gordon
d4aedf9951 Added SDL_SetWindowModalFor().
This is currently only implemented for X11.

This patch is based on work in Unreal Engine 4's fork of SDL,
compliments of Epic Games.
2015-04-21 09:45:58 -04:00
Ryan C. Gordon
e497e46515 Added SDL_SetWindowInputFocus().
This is currently only implemented for X11.

This patch is based on work in Unreal Engine 4's fork of SDL,
compliments of Epic Games.
2016-01-05 02:28:56 -05:00
Ryan C. Gordon
3bdaf4c611 Added SDL_SetWindowOpacity() and SDL_GetWindowOpacity().
This is currently implemented for X11, Cocoa, Windows, and DirectFB.

This patch is based on work in Unreal Engine 4's fork of SDL,
compliments of Epic Games.
2016-01-05 02:46:10 -05:00
Ryan C. Gordon
5696e88e6b Added SDL_GetWindowBordersSize().
This is currently only implemented for X11.

This patch is based on work in Unreal Engine 4's fork of SDL,
compliments of Epic Games.
2016-01-05 02:29:06 -05:00
Ryan C. Gordon
f9af0c0376 x11: Put a matching window_group wmhint on every window created.
This is useful to the Window Manager, so it can know to associate multiple SDL
windows with a single app.
2016-01-05 02:27:26 -05:00
Ryan C. Gordon
f2defe5e11 Added special window type flags.
Specifically: always on top, skip taskbar, tooltip, utility, and popup menu.

This is currently only implemented for X11.

This patch is based on work in Unreal Engine 4's fork of SDL,
compliments of Epic Games.
2016-01-05 01:30:40 -05:00
Ryan C. Gordon
c3114975db Added SDL_GetDisplayUsableBounds(). 2016-01-04 23:52:40 -05:00
Ryan C. Gordon
8875a4014f x11: Optimize SDL_GetGlobalMouseState() a little.
Use XInput2 to mark the global mouse state as dirty so we don't have to make
a bunch of roundtrips to the X server when nothing has changed.
2015-04-22 16:50:48 -04:00
Ryan C. Gordon
6df5e1e535 x11: Support _NET_WM_USER_TIME and give _NET_ACTIVE_WINDOW a valid timestamp.
Fixes Bugzilla #3056.
2016-01-04 16:25:27 -05:00
Sam Lantinga
42065e785d Updated copyright to 2016 2016-01-02 10:10:34 -08:00
Ryan C. Gordon
8145760314 X11: Handle keyboard layout changing during app's run on Ubuntu 12.04 (etc).
Fixes Bugzilla #3050 (in addition to Jason Wyatt's patch, prior to this).
2015-08-15 00:36:39 -04:00
Alfred Reynolds
51c72e10f7 Add X11 implementation of SDL_GetDisplayDPI. 2015-07-29 17:19:02 -07:00
Philipp Wiesemann
0e45984fa0 Fixed crash if initialization of EGL failed but was tried again later.
The internal function SDL_EGL_LoadLibrary() did not delete and remove a mostly
uninitialized data structure if loading the library first failed. A later try to
use EGL then skipped initialization and assumed it was previously successful
because the data structure now already existed. This led to at least one crash
in the internal function SDL_EGL_ChooseConfig() because a NULL pointer was
dereferenced to make a call to eglBindAPI().
2015-06-21 17:33:46 +02:00