src/video/x11/SDL_x11events.c


Log

Author Commit Date CI Message
Sam Lantinga cb361896 2020-12-09T07:16:22 Fixed bug 5235 - All internal sources should include SDL_assert.h Ryan C. Gordon We should really stick this in SDL_internal.h or something so it's always available.
Ryan C. Gordon 0ff5d55a 2020-11-23T21:07:28 x11: Don't try to grab the pointer on an unmapped window (thanks, Lee!) Fixes Bugzilla #5352.
Sam Lantinga 1ef45c18 2020-11-08T23:40:17 Fixed bug 5339 - Minor memory leak in SDL_x11events.c wcodelyokoyt The atom name that X11_GetAtomName() returns never gets freed, which result in a minor memory leak (14 bytes?) every time the user drops a file on a window. You can see the line in question here: https://github.com/spurious/SDL-mirror/blob/6b6170caf69b4189c9a9d14fca96e97f09bbcc41/src/video/x11/SDL_x11events.c#L1350 Fix: call XFree on name after the while loop.
Alberts Muktup?vels 73010da4 2020-10-19T17:26:33 x11events: ignore UnmapNotify events from XReparentWindow UnmapNotify event does not mean that window has been iconified. It just reports that window changed state from mapped to unmapped. XReparentWindow can unmap and remap window if it was mapped. This causes unnecessary events - HIDDEN, MINIMIZED, RESTORED and SHOW. These events are problematic with Metacity 3.36+ which started to remove window decorations from fullscreen windows. - SDL makes decorated window fullscreen - Metacity removes decorations - SDL gets UnmapNotify and exits from fullscreen - Metacity re-adds decorations As SDL will also get MapNotify event it will try to restore window state causing above steps to repeat. https://bugzilla.libsdl.org/show_bug.cgi?id=5314
James Legg f1d5ced1 2020-06-17T12:48:40 x11: Fix spurious keyboard focus events
Sam Lantinga eadc8693 2020-05-11T14:31:04 Fixed bug 5103 - Port fcitx support to both fcitx 4 & 5 wengxt Due to the new major fcitx version is coming close, the existing code need to be ported to use new Fcitx dbus interface. The new dbus interface is supported by both fcitx 4 and 5, and has a good side effect, which is that it will work with flatpak for free. Also the patch remove the dependency on fcitx header. Instead, it just hardcodes a few enum value in the code so need to handle the different header for fcitx4 or 5.
Sam Lantinga a8780c6a 2020-01-16T20:49:25 Updated copyright date for 2020
Ozkan Sezer 9340cfa9 2019-12-27T23:01:10 SDL_x11events.c (X11_DispatchEvent): remove FIXME and use SDL_strtokr().
Alex Smith e5af951e 2019-12-02T15:41:25 Fix sending SDL_WINDOWEVENT_RESTORED after unminimizing windows on X11 SDL_SendWindowEvent will only send a RESTORED event if the window has the minimized or maximized flag set. However, for a SHOWN event, it will clear the minimized flag. Since the SHOWN event was being sent first for a MapNotify event, the RESTORED event would never be sent. Swapping the SendWindowEvent calls around fixes this. https://bugzilla.libsdl.org/show_bug.cgi?id=4821
Ozkan Sezer 4953e050 2019-07-31T05:11:40 use SDL_zeroa at more places where the argument is an array.
Sam Lantinga 8dea23c7 2019-05-19T10:44:14 Fixed bug 3911 - SYSWM generic X11 events missing event data Andrei Drexler For X11 GenericEvents, the associated data is only available between a call to XGetEventData and the matching XFreeEventData, i.e. in X11_HandleGenericEvent. Trying to call XGetEventData a second time on the same event will fail, so an application that wants to inspect XInput2 events (e.g. for stylus pressure) has no way of retrieving its data from queued SYSWM events. The attached patch (based on SDL-2.0.7-11629) sends SYSWM messages from X11_HandleGenericEvent while the data is still available, allowing client code to register an event filter/watcher and process the event inside the callback.
Sam Lantinga 5e13087b 2019-01-04T22:01:14 Updated copyright for 2019
Sam Lantinga e3cc5b2c 2018-01-03T10:03:25 Updated copyright for 2018
Ryan C. Gordon e58c7920 2017-08-25T12:51:42 x11: Patched to compile with DEBUG_XEVENTS defined.
Sam Lantinga a4cfa936 2017-08-14T21:28:04 Fixed bug 2293 - Precise scrolling events Martijn Courteaux I implemented precise scrolling events. I have been through all the folders in /src/video/[platform] to implement where possible. This works on OS X, but I can't speak for others. Build farm will figure that out, I guess. I think this patch should introduce precise scrolling on OS X, Wayland, Mir, Windows, Android, Nacl, Windows RT. The way I provide precise scrolling events is by adding two float fields to the SDL_MouseWheelScrollEvent datastructure, called "preciseX" and "preciseY". The old integer fields "x" and "y" are still present. The idea is that every platform specific code normalises the scroll amounts and forwards them to the SDL_SendMouseWheel function. It is this function that will now accumulate these (using a static variable, as I have seen how it was implemented in the Windows specific code) and once we hit a unit size, set the traditional integer "x" and "y" fields. I believe this is pretty solid way of doing it, although I'm not the expert here. There is also a fix in the patch for a typo recently introduced, that might need to be taken away by the time anybody merges this in. There is also a file in Nacl which I have stripped a horrible amount of trailing whitespaces. (Leave that part out if you want).
Sam Lantinga fb835f9e 2017-08-14T20:22:19 Fixed bug 2330 - Debian bug report: SDL2 X11 driver buffer overflow with large X11 file descriptor manuel.montezelo Original bug report (note that it was against 2.0.0, it might have been fixed in between): http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=733015 -------------------------------------------------------- Package: libsdl2-2.0-0 Version: 2.0.0+dfsg1-3 Severity: normal Tags: patch I have occasional crashes here caused by the X11 backend of SDL2. It seems to be caused by the X11_Pending function trying to add a high number (> 1024) file descriptor to a fd_set before doing a select on it to avoid busy waiting on X11 events. This causes a buffer overflow because the file descriptor is larger (or equal) than the limit FD_SETSIZE. Attached is a possible workaround patch. Please also keep in mind that fd_set are also used in following files which may have similar problems. src/audio/bsd/SDL_bsdaudio.c src/audio/paudio/SDL_paudio.c src/audio/qsa/SDL_qsa_audio.c src/audio/sun/SDL_sunaudio.c src/joystick/linux/SDL_sysjoystick.c -------------------------------------------------------- On Tuesday 24 December 2013 00:43:13 Sven Eckelmann wrote: > I have occasional crashes here caused by the X11 backend of SDL2. It seems > to be caused by the X11_Pending function trying to add a high number (> > 1024) file descriptor to a fd_set before doing a select on it to avoid busy > waiting on X11 events. This causes a buffer overflow because the file > descriptor is larger (or equal) than the limit FD_SETSIZE. I personally experienced this problem while hacking on the python bindings package for SDL2 [1] (while doing make runtest). But it easier to reproduce in a smaller, synthetic testcase.
Ryan C. Gordon 2ffd6d02 2017-07-31T13:49:22 x11: Make a separate unmapped window to own clipboard selections. Now the clipboard isn't lost if you destroy a specific SDL_Window, as it works on other platforms. You will still lose the clipboard data on SDL_Quit() or process termination, but that's X11 for you; run a Clipboard Manager daemon. Fixes Bugzilla #3222. Fixes Bugzilla #3718.
Ryan C. Gordon 5574b433 2017-07-31T12:22:18 x11: Pass generic XEvents by pointer instead of copying to stack for XInput2.
Philipp Wiesemann 90ed3daa 2017-05-26T22:45:52 Changed messages about not recognized keys to include discourse link.
Bastien Bouclet 545fba78 2017-04-22T19:53:52 x11: Don't send duplicate events when reconciling the keyboard state Failing to check if a key was known to be pressed by SDL was causing SDL_SendKeyboardKey to send duplicate key pressed events with the repeat property set to true. Fixes Bugzilla #3637.
Sam Lantinga 45b774e3 2017-01-01T18:33:28 Updated copyright for 2017
Sam Lantinga 57d01d7d 2016-11-13T22:57:41 Patch from Sylvain to fix clang warnings
Sam Lantinga baadd546 2016-11-02T02:56:54 Fixed text input events with UIM Alex Baines I realized overnight that my patch probably broke text input events with UIM, and I confirmed that it does. Can't believe I overlooked that... I've been making stupid mistakes in these patches recently, sorry. Anyway, *this* one seems to fix it properly. Knowing my luck it probably breaks something else.
Alex Baines 8eb76276 2016-11-01T17:38:05 Skip duplicate key events sent by IMEs like uim.
Alex Baines 5fe98497 2016-10-28T01:28:58 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.
Sam Lantinga 27d4f099 2016-10-07T23:40:44 Implemented SDL_GetHintBoolean() to make it easier to check boolean hints
Sam Lantinga 808c75d1 2016-10-07T18:57:40 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)
Sam Lantinga 8b64a78d 2016-10-07T17:26:25 Fixed bug 2956 - De-reference videodata without NULL check in X11_DispatchEvent(_THIS) function
Alex Baines 752931d8 2016-10-03T11:35:34 Improve X11 key handling when XKB isn't available + add xvnc scancodes. Based on a patch by Bill Lash (see bug 3094).
Ryan C. Gordon b2510d9c 2016-09-29T23:01:43 x11: fixed incorrect SDL_GetWindowPosition() after resize (thanks, Jason!). Fixes Bugzilla #3272.
Sam Lantinga 67bdbcca 2016-09-29T16:05:29 Implemented SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH on X11
Ryan C. Gordon 02f49fdb 2016-03-04T18:47:19 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.
Ryan C. Gordon 0e2badc1 2016-02-12T00:27:21 x11: Patched to compile with DEBUG_XEVENTS on C89 compilers.
Ryan C. Gordon ed620333 2016-01-07T19:58:00 x11: make last mouse coords sane upon window entry (thanks, Cengiz!). (and thanks to Cengiz for many of the previous Unreal-related patches! They were generically credited to Epic Games, but a large amount of that work was his contribution.) Fixes Bugzilla #3067.
Ryan C. Gordon dc532c70 2016-01-05T02:27:50 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.
Ryan C. Gordon f9b73793 2016-01-05T02:26:45 Added SDL_DROPTEXT event, for dragging and dropping string data. This patch is based on work in Unreal Engine 4's fork of SDL, compliments of Epic Games.
Ryan C. Gordon 8e855f2f 2016-01-05T01:42:00 Added SDL_DROPBEGIN and SDL_DROPCOMPLETE events, plus window IDs for drops. This allows an app to know when a set of drops are coming in a grouping of some sort (for example, a user selected multiple files and dropped them all on the window with a single drag), and when that set is complete. This also adds a window ID to the drop events, so the app can determine to which window a given drop was delivered. For application-level drops (for example, you launched an app by dropping a file on its icon), the window ID will be zero.
Ryan C. Gordon 6df5e1e5 2016-01-04T16:25:27 x11: Support _NET_WM_USER_TIME and give _NET_ACTIVE_WINDOW a valid timestamp. Fixes Bugzilla #3056.
Sam Lantinga 42065e78 2016-01-02T10:10:34 Updated copyright to 2016
Ryan C. Gordon 257b7af2 2015-12-28T13:07:44 Sync up the caps/numlock state properly without sending key events. Partially fixes Bugzilla #2736 and #3125.
Sam Lantinga 2b0140a9 2015-10-27T11:17:32 Add a new SDL_KEYMAPCHANGED SDL event to abstract notification of keyboard layout or input language changes.
Alex Baines 7543092a 2015-09-30T04:16:09 Call setlocale + XSetModifiers before XOpenIM, Work around ibus+xim duplicate events.
Ryan C. Gordon 81457603 2015-08-15T00:36:39 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).
Ryan C. Gordon f2f8e6f5 2015-08-13T21:40:32 X11: only send mouse button up events if not a mousewheel "button" (Brackets in the wrong place, my bad!)
Ryan C. Gordon 874bf865 2015-08-13T17:40:28 X11: Simplified mousewheel event handling. Under load, this would race and report an incorrect mouse button event instead of a wheel event. Fixes Bugzilla #2987.
Ryan C. Gordon 0c19501e 2015-07-11T00:59:56 x11: Patched to compile on systems without the Xutf8LookupString() function.
Ryan C. Gordon 20ec1377 2015-06-30T14:41:17 X11: Call XRefreshKeyboardMapping() when we get various MappingNotify events. According to the Xlib docs, you need to do this or Xlib's internal state gets out of sync.
Ryan C. Gordon acdb494f 2015-06-30T14:39:39 X11: Don't ignore keyboard mapping changes. MappingNotify events don't have a window associated with them, so SDL was dropping these before the point where we would have handled them.
Sam Lantinga f1b7a843 2015-06-25T07:17:08 Fixed compiling if SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM is not defined
Philipp Wiesemann 0e45984f 2015-06-21T17:33:46 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().
Ryan C. Gordon 360d05bf 2015-06-04T15:41:39 X11: Fixed SelectionRequest replies for target TARGETS. Fixes Google Chrome, etc, freezing up when SDL owns the clipboard selection and actually sends thems the correct text for pasting. Confirmed working with Unicode strings in UTF-8 format. There were a few tweaks in this patch, but the specific fix is that event.xselection.target in the SelectionNotify event we send back in reply must be set to the same atom as the request ("TARGETS" in this case), and we failed to do that in this special case. Things that don't ask for a target, like the Gnome Terminal app, worked fine because they don't ask for TARGETS and just go right to asking for a UTF8_STRING, and Mozilla apparently just was more liberal in what they accepted in reply. Chrome would reject our wrong reply and freeze up waiting for a valid one. Someone should fix that in Chrome, too. :) Fixes Bugzilla #2926.
Ryan C. Gordon 96aef8cb 2015-06-04T10:59:02 X11: Fixed compiler warnings in DEBUG_XEVENTS sections.
Ryan C. Gordon e58a5c43 2015-05-31T00:58:43 X11: Fixed high mouse buttons mappings and horizontal wheels (thanks, Daniel!). Fixes Bugzilla #2472.
Sam Lantinga 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.
Sam Lantinga 719bb6fc 2015-05-28T09:52:48 Fixed X11 build, added code to print initial modifiers to checkkeys
Sam Lantinga 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.
Ryan C. Gordon c69a5592 2015-05-26T21:29:45 X11: generate clipboard update events (thanks, "chw"!). Partially fixes Bugzilla #2266.
Alex Baines ae6555df 2015-05-26T20:22:14 Pump IBus events after X events.
Sam Lantinga 2c4a6ea0 2015-05-26T06:27:46 Updated the copyright year to 2015
Ryan C. Gordon 589c46dd 2015-05-01T01:20:28 X11: send keypress events before textinput events.
Dimitris Zenios 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.
Ryan C. Gordon aa4952fd 2015-04-21T10:10:59 Added SDL_WINDOWEVENT_HIT_TEST. This lets windows know when they are dropping a mouse event because their hit test reported something other than SDL_HITTEST_NORMAL. It lets them know exactly where in the event queue this happened. This patch is based on work in Unreal Engine 4's fork of SDL, compliments of Epic Games.
Ryan C. Gordon 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.
Ryan C. Gordon c539b3f9 2015-04-12T20:59:48 Make X11 and Wayland ProcessHitTest() code less verbose.
Alex Szpakowski fe6c797c 2015-04-10T23:30:31 Fixed an iOS view orientation issue when SDL_GL_CreateContext or SDL_CreateRenderer is called.
Edward Rudd b88ca1b4 2015-02-10T16:28:56 the last parameter of XChangeProperty is the number of elements.. and when the element format is 32.. the element is "long" so we have 5 long elements here. Yes this seems confusing as on mac+linux Long is either 32 or 64bits depending on the architecture, but this is how the X11 protocol is defined. Thus 5 is the correct value for the nelts here. Not 5 or 10 depending on the architecture. More info on the confusion https://bugs.freedesktop.org/show_bug.cgi?id=16802
Ryan C. Gordon 56edbb40 2015-02-02T01:21:02 X11: Add events related to maximizing a window (thanks, Andrei and Gergely!). Fixes Bugzilla #1447.
Ryan C. Gordon 203ea981 2015-01-26T17:46:39 X11: Don't delay delivery of focus events unless we just changed vidmodes. Normally there's a 200 millisecond delay on all focus events in case there was a vidmode change, now we note the last vidmode change and only impose this delay if a change happened extremely recently. Thanks to Epic Games for reporting this issue.
Philipp Wiesemann b48e54aa 2015-01-26T22:00:29 Fixed bug 2802 - [patch] Fix android build compiling in wrong filesystem implementation Jonas Kulla The configure script didn't differentiate between Linux and Android, unconditionally compiling in the unix implementation of SDL_sysfilesystem.c. I'm probably one of the very few people building SDL for android using classic configure + standalone toolchain, so this has gone undetected all along.
David Ludwig 70438be2 2014-12-03T10:55:23 WinRT: fixed bug whereby SDL would override an app's default orientation WinRT apps can set a default, preferred orientation via a .appxmanifest file. SDL was overriding this on app startup, and making the app use all possible orientations (landscape and portrait). Thanks to Eric Wing for the heads up on this!
Sam Lantinga 767bb363 2014-11-28T04:42:46 Fixed bug 2676 - xdnd_version check issue in case ClientMessage Nitz I added xdnd_version check to XdndPosition case also under DEBUG_XEVENTS macro. by this we can get the action requested by user. I analysed further and found out that removing xdnd_version check at XdndDrop case is a bad idea because in XConvertSelection API timestamp should be passed if(xdnd_version >= 1) otherwise CurrentTime should be passed So xdnd_version check is important at XdndDrop case I made xdnd_version as a static so that it can store the version in other cases also.
Edward Rudd 5b5823ee 2014-11-23T21:09:54 add in support for passing down the "natural" (or flipped) scrolling direction in the MouseWheelEvent event
Philipp Wiesemann 9c398852 2014-11-22T22:20:40 Corrected header file documentation comment.
Brandon Schaefer a1dcebb2 2014-10-24T06:52:54 Remove unused variable.
Pierre-Loup A. Griffais 24c86b55 2014-09-11T19:24:42 [X11] Reconcile logical keyboard state with physical state on FocusIn since the window system doesn't do it for us like other platforms. This prevents sticky keys and missed keys when going in and out of focus, for example Alt would appear to stick if switching away from an SDL app with Alt-Tab and had to be pressed again. CR: Sam
Alex Baines f4ddacf4 2014-08-19T23:17:28 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.
Sam Lantinga bbab3855 2014-08-18T18:16:45 SDL - fix fullscreen desktop windows not restoring to fullscreen state if focus changes happen due to programtic window changes (and not user alt-tabbing)
Ryan C. Gordon 84cb2320 2014-06-25T17:13:43 Patched to compile with -Werror=declaration-after-statement
Ryan C. Gordon b29740b8 2014-06-25T17:06:12 Merged Ryan's SDL-gui-backend branch. Adds three APIs, and implements them on X11, Cocoa, and Windows: - SDL_CaptureMouse() - SDL_GetGlobalMouseState() - SDL_SetWindowHitTest()
Sam Lantinga b56b37cd 2014-06-21T17:25:59 Fixed warning when building without ibus
Alex Baines 41a39837 2014-06-18T20:11:39 Add IBus IME Support, move DBus code to its own file. (v3.3 squashed)
Sam Lantinga 260549d1 2014-06-15T18:31:30 Fixed bug 2567 - x11: Local dropped files are not URI-decoded Melker Narikka Local files that are dropped onto a window under X11 are not going through a URI decoding step, resulting in the following in my test application: Dropped file /home/meklu/Pictures/Screenshot%20from%202013-10-30%2014:04:50.png Couldn't load /home/meklu/Pictures/Screenshot%20from%202013-10-30%2014:04:50.png Expected result: Dropped file /home/meklu/Pictures/Screenshot from 2013-10-30 14:04:50.png Loaded /home/meklu/Pictures/Screenshot from 2013-10-30 14:04:50.png successfully I've attached a patch that fixes the issue by doing URI decoding in-place on the file string buffer.
Ionut Leonte 2d38a71a 2014-06-05T00:45:16 Added SDL_HITTEST_RESIZE_*, and implemented for X11.
Sam Lantinga 529bcf62 2014-06-04T10:56:43 Fixed bug 2526, but regressed delivering dead key presses
Ryan C. Gordon 98c03f39 2014-05-28T01:22:47 Changed drag area API to a hit-testing API. There were several good arguments for this: it's how Windows works with WM_NCHITTEST, SDL doesn't need to manage a list of rects, it allows more control over the regions (how do you use rects to cleanly surround a circular button?), the callback can be more optimized than a iterating a list of rects, and you don't have to send an updated list of rects whenever the window resizes or layout changes.
Ryan C. Gordon 7a4ddcd8 2014-05-27T15:47:25 Don't hardcode an 8 here.
Ryan C. Gordon 20ac4bae 2014-05-27T15:40:03 Some updates for the X11 drag areas work.
Damian Kaczmarek 2744c019 2014-05-27T14:41:16 Initial work on X11 implementation of SDL_SetWindowDragAreas().
Sam Lantinga f6953cf4 2014-04-17T20:02:11 Fixed bug 2502 - Memory leak inside SDL_x11events.c -> X11_DispatchEvent(_THIS) bojko_1000 Code @566: if (data->xwindow) { Atom _net_frame_extents = X11_XInternAtom(display, "_NET_FRAME_EXTENTS", 0); Atom type = None; int format; unsigned long nitems = 0, bytes_after; unsigned char *property; X11_XGetWindowProperty(display, data->xwindow, _net_frame_extents, 0, 16, 0, XA_CARDINAL, &type, &format, &nitems, &bytes_after, &property); if (type != None && nitems == 4) { border_left = ((long*)property)[0]; border_right = ((long*)property)[1]; border_top = ((long*)property)[2]; border_bottom = ((long*)property)[3]; } } Code after _the fix_: if (data->xwindow) { Atom _net_frame_extents = X11_XInternAtom(display, "_NET_FRAME_EXTENTS", 0); Atom type = None; int format; unsigned long nitems = 0, bytes_after; unsigned char *property; X11_XGetWindowProperty(display, data->xwindow, _net_frame_extents, 0, 16, 0, XA_CARDINAL, &type, &format, &nitems, &bytes_after, &property); if (type != None && nitems == 4) { border_left = ((long*)property)[0]; border_right = ((long*)property)[1]; border_top = ((long*)property)[2]; border_bottom = ((long*)property)[3]; } X11_XFree(property); } I have found that leak with valgrind.
David Ludwig 3dcb451f 2014-04-09T21:29:19 Added a README file regarding WinRT support To note, this file is currently formatted with CRLF line endings, rather than LF, to allow the file to be viewed with Notepad.
Brandon Schaefer 2298ed17 2014-03-25T15:18:18 Remove two unused variables, causing compiler warnings.
Bastien Nocera 4ca76b3e 2014-03-02T14:59:06 Add support for the freedesktop.org Idle Inhibition specification, as per: http://people.freedesktop.org/~hadess/idle-inhibition-spec/ This makes screensaver inhibition work with GNOME 3 and other desktop environments that implement the specification. https://bugzilla.libsdl.org/show_bug.cgi?id=2169
Gabriel Jacobo abe2ac2c 2014-02-21T08:37:57 Fixes #2326, clean up the X11 backend a bit
Sam Lantinga 58edac3e 2014-02-02T00:53:27 Fixed bug 2374 - Update copyright for 2014... Is it that time already??
Sam Lantinga 7aef2350 2013-12-23T17:37:22 Added a relative mouse mode that uses mouse warping instead of raw input. To enable this, set the environment variable SDL_MOUSE_RELATIVE_MODE_WARP to "1" When mouse relative mode is disabled, put the cursor back where the application expects it to be, instead of where it was when relative mode was enabled.
Gabriel Jacobo f848adff 2013-11-29T10:06:08 Improve Android pause/resume behavior.
Ryan C. Gordon 7e1289af 2013-11-24T23:56:17 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.
Gabriel Jacobo 15a3bbcb 2013-11-10T20:38:50 [X11] Ignore both NotifyGrab and NotifyUngrab modes in FocusIn/FocusOut events
Sam Lantinga 9228c845 2013-11-10T14:48:44 Fixed issue with dead key press/release events being filtered out.
Sam Lantinga 0d39d090 2013-11-10T14:33:01 Hopefully fixed focus problems when handling a global hotkey on X11. See this thread for details: https://bugzilla.mozilla.org/show_bug.cgi?id=578265