Commit graph

185 commits

Author SHA1 Message Date
Ryan C. Gordon
fc98164d8d Replaced Gnome screensaver hack with D-Bus messages to org.gnome.ScreenSaver. 2012-12-28 03:46:55 -05:00
Sam Lantinga
7f73dcd4f6 Reset the keyboard when we lose input focus 2012-11-07 11:13:28 -08:00
Sam Lantinga
6b50a0eb68 Don't lose focus if a child window gains focus 2012-11-07 08:49:59 -08:00
Sam Lantinga
209fc0f3aa Fixed XBadWindow error when iconified under Unity3D
Apparently the root window changes in this case.  We want to send to the root window that is being listened to by the window manager, so this should be okay.
2012-11-06 10:34:47 -08:00
Ryan C. Gordon
dbbd206084 X11: Handle _NET_WM_PING protocol, so window manager knows when app is hung up. 2012-11-02 15:22:37 -04:00
Ryan C. Gordon
d7d06ad754 WM_DELETE_WINDOW should check that the event message_type is WM_PROTOCOLS. 2012-11-02 14:15:21 -04:00
Sam Lantinga
28fc0e9923 Keep track of the configure events we've received from the X server.
When programmatically resizing a window on Unity 3D, we'll get a move event with the old size before we get a size event with the new size, and we don't want to clobber our internal state with the old size.
2012-10-03 13:37:44 -07:00
Sam Lantinga
2c196568a8 We need to queue the focus in/out changes because they may occur during video mode changes and we can respond to them by triggering more mode changes. 2012-09-28 14:01:55 -07:00
Sam Lantinga
e6a0c63fb7 Simplified the NetWM code a little bit, and it now operates on X11 Window 2012-09-28 01:51:51 -07:00
Sam Lantinga
c5d1dc43c3 Compositing window managers can show and hide windows without ever affecting the mapped state. However they do send NetWM protocol messages to indicate this is happening.
Also refactored the netwm state code so it's consistent between the places that use it.
2012-09-27 23:55:38 -07:00
Sam Lantinga
f380ecb137 Removed executable bit from source files 2012-09-27 14:35:28 -07:00
Sam Lantinga
fb1d522bc3 Show events from all windows (for the legacy fullscreen case) 2012-09-27 13:52:07 -07:00
Sam Lantinga
1401f159d0 Added debug define (commented out) 2012-09-27 13:22:34 -07:00
Ryan C. Gordon
8810d45057 Fixed typo in function name. 2012-09-17 19:20:47 -04:00
Dimitris Zenios
f39fe05937 1.Fixed a memory leak inside XInput2 code
2.Replaced XKeycodeToKeysym with XkbKeycodeToKeysym since XKeycodeToKeysym is deprecated in newer X11 version
3.Rewrote testime.c since it was disabled after SDL_compat.c removal
4.Take into account common arguments also in testrelative.c
2012-05-31 19:23:30 +03:00
Dimitris Zenios
497b8deec4 1.Moved all xinput2 functionality to its own file
2.Implement touch events using Xinput2.Leave evtouch as a fallback when xinput2 is not supported
2012-05-31 13:37:02 +03:00
Sam Lantinga
6accd81680 Initial support for XInput2 by Dimitris Zenios
1.initial work on XInput2 support
2.Implemented relative mouse motion when XInput2 is enabled
3.Created a test app to test relative mouse motion
4.Fixed Bug #1498
2012-05-30 11:25:35 -04:00
Sam Lantinga
0093511f82 Fixed bug 1305 - mouse wheel scroll-down event created when mouse wheel is pressed down
Martin Schreiber 2011-09-15 06:08:38 PDT

patch attached
2012-01-08 00:36:32 -05:00
Sam Lantinga
028e5dcdbd Happy New Year! 2011-12-31 09:28:07 -05:00
Ryan C. Gordon
bc13816375 Fixed a whole slew of compiler warnings that -Wall exposed. 2011-10-13 01:08:30 -04:00
Ryan C. Gordon
7ab5cda6fc X11 touch handling fixed for one device (LPC32xx Touchscreen). 2011-08-05 00:55:29 -04:00
Sam Lantinga
b0660ba5ff SDL 1.3 is now under the zlib license. 2011-04-08 13:03:26 -07:00
Sam Lantinga
65b0f3090a Fixed bug 1173 (No mouse wheel event on linux/x11)
Matthias      2011-03-20 23:07:02 PDT

On X11, SDL 1.3 does not generate a mouse wheel event. Instead, button
down/buttton up events are generated by SDL. After looking at the code in
SDL_x11events.c, I assume this is due to the fact that X11 does not have a
dedicated mouse wheel event.

I did a little research on the behavior of mouse wheel events on X11 systems.
Apparently, mouse wheel events generate a button down/button up event with the
same time, i.e. with exact same timestamp.

Attached you can find my changes to SDL_x11events.c, which generates SDL mouse
wheel events for those button down events that have a button release event
immediately following it (for the same button, and with the same timestamp).

I did have to make an assumption: As standard X11 implementations know only 5
buttons, I have mapped Button4 to "wheel up" (i.e. +1), and Button5 to "wheel
down" (i.e. -1).

Note that if you include this patch, no SDL button down/up events will be
generated on X11 platforms for mouse wheel events (which is probably a
significant change for those that have programmed their code to work with
them).
2011-04-05 09:35:56 -07:00
Sam Lantinga
fc9ee0c10f Fixed so code will compile with SDL_config_minimal.h 2011-03-12 13:21:57 -08:00
Sam Lantinga
73b501d88c Dynamically load the Xinerama and xf86vmode extensions
This fixes a few bugs with different distributions:
http://bugs.freedesktop.org/show_bug.cgi?id=17431
http://bugs.gentoo.org/show_bug.cgi?id=246177
2011-02-28 09:01:53 -08:00
Sam Lantinga
e5803d148c Happy 2011! :) 2011-02-11 22:37:15 -08:00
Sam Lantinga
76a24d278d Sheena pointed out that "scancode" and "keysym" are single words and shouldn't be camel-cased. 2011-02-07 09:37:11 -08:00
krogoway
a2f2302255 Renamed SDL_keysym to SDL_KeySym
Renamed SDL_scancode to SDL_ScanCode
Added #defines to SDL_compat.h
2011-01-24 13:47:35 -06:00
Sam Lantinga
5c9e54ea34 Added the ability to get the UIKit window through the SDL API.
You can also do this through the native API:
	UIWindow *window = [[UIApplication sharedApplication] keyWindow];

Also needed to name the union for events and window info.
2011-01-20 16:05:59 -08:00
Sam Lantinga
9854e3dd2d Fixed compiling X11 touch interface 2010-12-30 13:21:39 -08:00
Sam Lantinga
3189c43f85 Make the union nameless to reduce the complexity of the API.
(Are there any compilers still in use that don't support this?)
2010-09-29 21:13:52 -07:00
Sam Lantinga
45e68f6c5c Merged the Windows custom window system hooks into the union used by X11.
Added Cocoa custom window system hooks
2010-09-27 01:24:05 -07:00
Sam Lantinga
238acbd53d Merged Jim's Google Summer of Code work from SDL-gsoc2010_gesture 2010-08-22 12:07:55 -07:00
Jim Grandpre
bcd4b4df6f Fixed gestureMulti. Disabled dollar gesture temporarily. 2010-08-04 23:17:30 -04:00
Jim Grandpre
a4c4851398 Fixed some Gesture bugs 2010-08-02 00:14:53 -04:00
Sam Lantinga
5d2b7ba68b Fixed key repeat detection on X11, and simplified the code for everyone else. 2010-07-21 21:47:12 -07:00
jimtla
c1e63cf801 Fixed x11 compile bugs. 2010-07-22 08:12:28 +04:00
Sam Lantinga
0e59ffc802 Added support for keyboard repeat (only tested on Windows so far) 2010-07-20 23:25:24 -07:00
Sam Lantinga
cd1d53f11c Applied the same logic as the fix for bug 894.
Anytime we enter the window, we gain the mouse focus.  If we leave the window because of a normal LeaveNotify, then we lose mouse focus.
2010-07-20 00:05:32 -07:00
Sam Lantinga
658b2fec59 Fixed X error when showing debug info about a deleted property 2010-07-19 23:29:45 -07:00
Sam Lantinga
9f37dd980a Added back in a little more debugging for the X11 keyboard code 2010-07-18 01:00:01 -07:00
Sam Lantinga
80a6bed7ab Zero any fields not explicitly filled in. 2010-07-14 07:25:07 -07:00
Sam Lantinga
b60cbd560d Much better debugging of property changes 2010-07-14 00:08:46 -07:00
Sam Lantinga
c62b2a5995 Turned off debug spew 2010-07-13 23:14:00 -07:00
Sam Lantinga
983b11625f Lots of prep for the "real" way to support fullscreen mode on modern window managers.
Unfortunately, this doesn't work.  I also noticed that maximizing doesn't work as well.  Also xprop hangs when trying to list properties of SDL windows.... ???
2010-07-13 23:11:10 -07:00
Sam Lantinga
22a37911dd Merged changes from the main SDL codebase
--HG--
rename : VisualC/SDL/SDL.vcproj => VisualC/SDL/SDL_VS2005.vcproj
rename : VisualC/SDL.sln => VisualC/SDL_VS2005.sln
rename : VisualC/SDLmain/SDLmain.vcproj => VisualC/SDLmain/SDLmain_VS2005.vcproj
2010-07-12 21:09:23 -07:00
Sam Lantinga
2e99ef1dfc Added X11 clipboard support.
As far as I know there isn't any real way to tell when the clipboard contents have changed without polling them, so I didn't implement the clipboard update event on X11.
2010-07-12 00:36:55 -07:00
Sam Lantinga
320eb4600b Cleaned up the mouse window focus handling: you always pass in the relative window when sending a mouse event.
Fixed a bug where only mouse wheel up was sent on Mac OS X
Fixed a bug where mouse window focus was getting hosed by the fullscreen mouse code on Mac OS X
2010-07-05 22:48:13 -07:00
Sam Lantinga
95fbd50b15 Mostly cleaned up warnings with -Wmissing-prototypes 2010-06-26 08:56:48 -07:00
Jim Grandpre
06e66b928e Fixed bugs in input, cleaned up $1 2010-06-18 01:43:02 -04:00