Commit Graph

51 Commits

Author SHA1 Message Date
Sam Lantinga
f7eea9848d Avoid conflicts with multiple versions of udev by first trying the library that is linked with the executable, if any, and then picking the one that is in the build environment.
This fixes joystick detection for applications using the Steam Linux Runtime
2016-11-29 05:34:20 -08:00
Sam Lantinga
9cc7ce9008 Renaming of guard header names to quiet -Wreserved-id-macro
Patch contributed by Sylvain
2016-11-20 21:34:54 -08:00
Sam Lantinga
2ae04deb92 Removed unused constants
Except for SDL_bmp.c where they are historically interesting and I've left them in.
2016-11-15 01:24:58 -08:00
Sam Lantinga
5e1151257d Patch from Sylvain to fix clang warnings 2016-11-13 22:57:41 -08:00
Sam Lantinga
85bae43dc0 Fixed bug 3473 - can't build on linux with an old kernel 2016-11-01 10:33:44 -07:00
Philipp Wiesemann
9c939bab22 Linux: Fixed compile warnings about unused variables. 2016-10-15 20:02:17 +02:00
Sam Lantinga
fa961623d4 Fixed warning about redefining DECLSPEC 2016-10-14 08:22:48 -07:00
Sam Lantinga
bb5e67d540 Fixed warning about missing field initializers in SDL_DBusContext
Static variables are automatically initialized to zero.
2016-10-14 08:20:40 -07:00
Sam Lantinga
032bd3f6e8 Fixed building with cmake when fcitx isn't installed 2016-10-14 01:04:21 -07:00
Philipp Wiesemann
ccd64798e1 Linux: Removed redundant function call. 2016-10-12 23:36:29 +02:00
Sam Lantinga
7ec488f511 Fixed building and using fcitx IME support on Linux 2016-10-08 11:30:07 -07:00
Sam Lantinga
fa696929a9 Fixed bug 2824 - Add Fcitx Input Method Support
Weitian Leung

Just moved ibus direct call to SDL_IME_* related functions, and adds fcitx IME support (uses DBus, too),
enable with env: SDL_IM_MODULE=fcitx (ibus still the default one)
2016-10-07 18:57:40 -07:00
Sam Lantinga
41f15322f1 Fixed compiler warning about missing field initializers 2016-10-04 03:42:42 -07:00
Sam Lantinga
74c4f02d1a Fixed build on older Raspberry Pi environments 2016-10-01 15:04:13 -07:00
Sam Lantinga
c8ea0cbc3d Fixed warning and code style in SDL_evdev.c 2016-10-01 14:56:53 -07:00
Sam Lantinga
823be1b075 Fixed bug 3157 - Rudimentary touchscreen support in SDL_evdev (supports Raspberry Pi)
tvc

I've spent the last few days implementing touchscreen support in core/linux/SDL_evdev.c. It's fairly rudimentary at the moment, as can be seen from the multiple TODO's and FIXME's littered throughout, but I'm mainly submitting this patch for review. I've tested this patch on my Raspberry Pi 2 with the official touchscreen and it works fantastically, reporting all 10 multitouch points. I'm happy to work on this further, the evdev logic also needs a bit of a cleanup I think (I may have included a few changes). But if it's good enough in its current state to be committed then I'm sure there'd be plenty of people pleased, as currently the only other framework/library that supports touchscreens on the Raspberry Pi is Kivy.
2016-10-01 13:51:56 -07:00
Sam Lantinga
255c182471 Updated copyright to 2016 2016-01-02 10:10:34 -08:00
Sam Lantinga
797525f534 Fixed whitespace in SDL_evdev.c 2015-06-24 17:55:38 -07:00
Sam Lantinga
705e5df32d Fixed an issue with mouse/keyboard removal
Sometimes, on removal SDL_EVDEV_udev_callback() gets called with zero udev_class. This in turn seems to be caused the SDL_udev.c:guess_device_class() failing to find the attributes of the parent device.

Apparently this is normal, attributes are not guaranteed to be in place during removal, depending on timing. This lack of attributes causes guess_device_class() to return zero.

This fix mimics the code in linux/SDL_sysjoystick.c:joystick_udev_callback() which effectively has the same fix already in place.
2015-06-24 17:54:39 -07:00
Ryan C. Gordon
1854d3de07 Make some string literals "const char *", not "char *" (thanks, Martin!).
Fixes Bugzilla #3007.
2015-06-12 11:58:31 -04:00
Ryan C. Gordon
0e3c2534ca Fixed a memory leak (thanks, Zack!).
We should probably rework this piece of code a little more after 2.0.4 ships,
though.

Fixes Bugzilla #3004.
2015-06-07 17:54:39 -04:00
Ryan C. Gordon
6109f0d1dc Changed a static function to match the naming scheme of rest of source file. 2015-06-01 01:25:22 -04:00
Alex Baines
fa21b5b628 [IBus] Only register interest in messages sent to our input context. 2015-02-27 21:17:29 +00:00
Alex Baines
6609e24b9f [ibus] Send an empty TextEditing event when the text is cleared by pressing backspace. 2015-02-01 21:08:54 +00:00
Sam Lantinga
78f2198e6c Updated the copyright year to 2015 2015-05-26 06:27:46 -07:00
Sam Lantinga
8f14ca455d Wait for devices to finish initializing when inserted, before using them. Fixes hotplug issue with XBox 360 game controller. 2015-05-25 16:22:09 -07:00
Alex Baines
9d7f5e9ae6 Fix DBus error message if IBus couldn't be initialized. 2015-03-20 19:47:03 +00:00
Sam Lantinga
acb5492583 Fixed detecting the NVIDIA controller which shows up as both a mouse and a game controller 2015-04-01 19:18:56 -07:00
Edward Rudd
555eff59b7 handle the case where the ibus address can't be found. (prevents nasty crash) 2015-04-01 16:11:37 -04:00
Sam Lantinga
825dd6dd85 Treat any key device as a keyboard
This matches commit b8e85a5ac99a for when udev is not running
2014-12-13 13:20:19 -08:00
Edward Rudd
835d487683 add in support for passing down the "natural" (or flipped) scrolling direction in the MouseWheelEvent event 2014-12-03 11:00:56 -05:00
Gabriel Jacobo
d9bcf961c1 [udev] Fixes #2654, ID_INPUT_KEY devices are ignored.
Also added some references to udev code where these flags are set.
2014-10-16 09:41:42 -03:00
Sam Lantinga
33e438b7be Fixed input device detection on systems that aren't running the udev daemon 2014-10-15 09:10:50 -07:00
Sam Lantinga
2af49b5e11 Fixed crash if the event subsystem didn't initialize properly 2014-10-15 09:09:57 -07:00
Sam Lantinga
a1a614d0b1 May have fixed the Linux build again 2014-08-23 19:06:54 -07:00
Sam Lantinga
ce2cb1ace7 Fixed Linux build 2014-08-23 11:00:16 -07:00
Ryan C. Gordon
2e017ec0c7 Fix declaration-after-statement errors in ibus code. 2014-08-21 23:22:46 -04:00
Ryan C. Gordon
7c0b589f6d Adjusted code style slightly for SDL_ibus.c 2014-08-21 23:15:17 -04:00
Sam Lantinga
d0f88669b0 Changed the name of the IME hint to match the naming convention in SDL 2014-08-19 21:59:56 -07:00
Alex Baines
942fd14cf2 Add a SDL_IM_INTERNAL_EDITING event to make IMs like iBus render editing text in its own UI instead of sending TEXTEDITING events.
This is useful for applications that handle TEXTINPUT events but not TEXTEDITING events.
2014-08-19 23:31:50 +01:00
Alex Baines
bf7865e0f7 Improvements to the IBus related code:
+ Handle HidePreeditText IBus signal.
+ Use SDL_GetKeyboardFocus instead of SDL_GetFocusWindow.
+ Move the X11 IBus SetFocus calls to the X11_DispatchFocus functions.
+ Simplify the IBus ifdefs when handling X11 KeyEvents.
+ Remove inotify watch when SDL_IBus_Quit is called.
2014-08-19 23:17:28 +01:00
Alex Baines
1772e0a656 Take the window border size into account when positioning the IBus candidate list. 2014-08-19 22:28:53 +01:00
Brandon Schaefer
d50b6d8f85 Dont redeclare DBusMessage* msg; 2014-07-18 14:10:45 -07:00
Alex Baines
2247ef24b4 Call dbus_shutdown to make valgrind happy. 2014-07-06 22:15:31 +01:00
Alex Baines
3450ee34f3 Add IBus IME Support, move DBus code to its own file. (v3.3 squashed) 2014-06-18 20:11:39 +01:00
Sam Lantinga
465d086298 Fixed bug 2477 - [PATCH] Joysticks do not work on RHEL6/CentOS6 systems
Ashley Whetter

RHEL6 and CentOS6 systems still use an old version of udev (147). It wasn't until udev 148 (Yep. 1 version off!) that the input class system changed from "ID_CLASS" to "ID_INPUT_{JOYSTICK,KEYBOARD,MOUSE,etc}" (http://lwn.net/Articles/364728/). Because SDL2 looks for the ID_INPUT_X field this means that it never detects any input devices on RHEL6 systems.

I've attached a patch which fixes the problem. If no input devices are detected with "ID_INPUT_X" then SDL will fallback to looking for the old style "ID_CLASS" udev field instead.
Because of the "big change" between udev versions I doubt it'll ever get upgraded on RHEL6, but because RHEL7 is on the way I don't know if this patch is worth merging. Hopefully it'll help anyone out that's having this problem though.
2014-04-17 20:18:50 -07:00
Sam Lantinga
dba255c1e5 Fixed bug 2374 - Update copyright for 2014...
Is it that time already??
2014-02-02 00:53:27 -08:00
Ryan C. Gordon
03d5719413 Make internal SDL sources include SDL_internal.h instead of SDL_config.h
The new header will include SDL_config.h, but allows for other global stuff.
2013-11-24 23:56:17 -05:00
Sam Lantinga
6446587773 Fixed bug 2231 - Move src/input/evdev into src/core/linux
Ryan C. Gordon

To keep the directory layout sane, we should probably move this one piece of source to the linux catch-all directory, instead of making it look like this is part of an SDL "input" subsystem.
2013-11-16 12:02:09 -08:00
Sam Lantinga
bbb5497a4d Fixed bug where a Logitech wireless keyboard with built-in mouse touchpad didn't get recongized as both devices. 2013-10-05 21:15:55 -07:00