include/SDL_syswm.h


Log

Author Commit Date CI Message
Sam Lantinga 0479df53 2023-01-09T09:48:21 Updated copyright for 2023
Ethan Lee c37090f9 2022-04-18T12:30:08 wayland: Add support for TOOLTIP/POPUP_MENU
Sam Lantinga 4b38d4c9 2022-01-07T12:37:28 Leave the Metal view active on the window when recreating the Metal renderer Fixes https://github.com/libsdl-org/SDL/issues/5140 Also move the metal tag definition to SDL_syswm.h so it can be used by applications
Sam Lantinga 120c76c8 2022-01-03T09:40:00 Updated copyright for 2022
Cameron Cawley 25c71748 2020-02-13T21:55:08 Add a barebones RISC OS video driver
Cacodemon345 b592e78f 2021-09-25T12:55:41 wayland: Expose xdg_toplevel to SysWM
Simon Zeni 6aae5b44 2021-07-27T17:12:26 Remove wl-shell and xdg-shell-unstable-v6 support (#4323) * wayland-protocol: update wayland.xml to 1.19.0 * wayland: remove shell_surface field from SDL_SysWMinfo * wayland: remove wl_shell support * waypand-protocols: update xdg-shell.xml to 1.20 * wayland: remove xdg-shell-unstable-v6 support * wayland: deprecate wl shell surface syswm info, add xdg surface
Ryan C. Gordon c88eb7a8 2021-07-14T17:07:04 Sync wiki -> header.
Ryan C. Gordon 3f40396d 2021-03-21T14:18:39 First shot at merging the wiki documentation into the headers.
Ozkan Sezer b3498a5d 2021-02-22T15:50:02 make SDL_syswm.h work with apple's older gcc versions c.f. https://bugzilla.libsdl.org/show_bug.cgi?id=2694
Manuel Alfayate Corchete 2c764331 2021-01-31T04:04:26 [KMS/DRM] Merge patch for bug 5522#: Implement KMSDRM_GetWindowWMInfo().
Sam Lantinga 6a342954 2021-01-14T14:42:53 Fixed bug 5451 - Can't create EGLSurface in Wayland from SDLWindow (no EGLNativeWindow pointer) sashikknox In some cases, need create EGLWindow with SDLWindow. In X11 i can get pointer to NativeWindow from **struct SDL_SysWMinfo wmInfo** ```C++ struct SDL_SysWMinfo wmInfo; SDL_GetWindowWMInfo(ptSDLWindow, &wmInfo) #if defined(__unix__) && defined(SDL_VIDEO_DRIVER_X11) nativeWindow=(EGLNativeWindowType)wmInfo.info.x11.window; nativeDisplay=(EGLNativeDisplayType)wmInfo.info.x11.display; #endif ``` than i can create EGLSurface ``` eglCreateWindowSurface(nativeDisplay, EGL_CONFIG, nativeWindow, SURFACE_ATTRIBUTES); ``` in Wayland i can do it with same way, just need pointer to **EGLWindow**, we already have pointer to **wl_display** from **SDL_sysWMInfo**, need add to **wl** struct in SDL_SysWMInfo another pointer to **struct wl_egl_window *egl_window;**. And in wayland backend, in function **Wayland_GetWindowWMInfo** return pointer to **egl_window** from **SDL_WindowData** Now i use patched statically built SDL2 in port of Quake 2 GLES2 for SailfishOS (it use QtWayland): link to SDL2 commit and changed string for patch: - https://github.com/savegame/lp-public/commit/6858a618cd179b766fe3cab36055f07cb03ad0ea - https://github.com/savegame/lp-public/blob/b1e29e87b9d15780e47f04918b329ac15554fc69/SDL2/src/video/wayland/SDL_waylandwindow.c#L463 link to use in Quake2 port: 1. here i get pointer to EGLNativeWindowType: https://github.com/savegame/lp-public/blob/6d94fedb1b720da24999ae6286a1809cd3d55ff5/Engine/Sources/Compatibility/OpenGLES/EGLWrapper.c#L319 2. then use it for create EGLSurface: https://github.com/savegame/lp-public/blob/6d94fedb1b720da24999ae6286a1809cd3d55ff5/Engine/Sources/Compatibility/OpenGLES/EGLWrapper.c#L391
Sam Lantinga 9130f7c3 2021-01-02T10:25:38 Updated copyright for 2021
Ozkan Sezer d2723875 2020-10-14T23:01:06 os2: integrate the port into main tree.
Sam Lantinga a8780c6a 2020-01-16T20:49:25 Updated copyright date for 2020
EXL b22fb9e2 2019-11-11T16:44:40 haiku: Implement message box for Haiku Add implementation for functions: SDL_ShowSimpleMessageBox() SDL_ShowMessageBox() Add simple customization support also. Fix build for x86_gcc2. Partially fixes Bugzilla #4442.
Sam Lantinga 3efea5ea 2019-09-11T15:08:37 Don't have Windows headers define min/max, in case they're defined by application code
Sam Lantinga 5e13087b 2019-01-04T22:01:14 Updated copyright for 2019
Sylvain Becker 6259a726 2018-12-05T16:13:12 Warnings: fix a documentation warning and missing prototypes
Ozkan Sezer a60751b7 2018-11-06T20:50:24 fix bug #4362 - SDL_syswm.h with SDL_PROTOTYPES_ONLY broken in C++ mode
Ryan C. Gordon bc57ac27 2018-11-02T21:34:17 mir: Removed mir client support. Fixes Bugzilla #4288.
Sam Lantinga c04dca0d 2018-05-07T19:26:02 Fixed bug 4159 - Windows headers are included after packing alignment change lectem The SDL_syswm.h header includes the windows.h header after including begin_code.h which changes the structure packing alignment. It seems this is not safe as suggested by the following warning : warning C4121: 'JOBOBJECT_IO_RATE_CONTROL_INFORMATION_NATIVE_V2': alignment of a member was sensitive to packing
Sam Lantinga e3cc5b2c 2018-01-03T10:03:25 Updated copyright for 2018
Sam Lantinga c350d91a 2017-08-14T10:15:38 Fixed bug 3752 - minor os2 defines Ozkan Sezer Attached three patches, so these minor os/2 bits get registered mainstream: 1. SDL_syswm.h: add SDL_SYSWM_OS2 to SDL_SYSWM_TYPE enum 2. SDL_platform.h: recognize __EMX__ too as __OS2__ 3. begin_code.h: set SDLCALL as _System for OS/2.
Ryan C. Gordon 3c955d05 2017-06-11T00:50:26 syswm: prevent buffer overflow if SDL and app have different config headers. This only affects Wayland and DirectFB, as a Unix system generally has X11 support. Other platforms also have different sizes for the C union in question, but are likely the only target for that platform, etc. Apps that might run on Wayland or DirectFB will need to be compiled against new headers from an official 2.0.6 release, or be prepared to force the x11 target, or not use SDL_GetWindowWMInfo(). Fixes Bugzilla #3428.
Philipp Wiesemann cbcc256f 2017-06-04T23:15:39 Fixed comments in headers for doxygen output.
Sam Lantinga 45b774e3 2017-01-01T18:33:28 Updated copyright for 2017
Sam Lantinga 36156335 2016-11-20T21:34:54 Renaming of guard header names to quiet -Wreserved-id-macro Patch contributed by Sylvain
Sam Lantinga 4a089ca1 2016-11-20T21:18:55 Fixed bug 3486 - Can't get HINSTANCE of my window realitix SDL2 allows to create widow and to get information through SDL_SysWMinfo. But it misses something, with Vulkan, you need the HWND and HINSTANCE of the window for Win32 system. Sadly, SDL2 provides only HWND but not HINSTANCE. In some context, it can be difficult to get the HINSTANCE, indeed, I'm using pySDL2 (Python) and I can only access properties that SDL2 gives me. I have to use a dirty trick like that to get the HINSTANCE: (https://raw.githubusercontent.com/bglgwyng/pyVulkan/master/examples/win32misc.py)
Sam Lantinga e5d575b9 2016-01-16T21:58:49 Expose the EGL display and window for Vivante SDL windows
Sam Lantinga 42065e78 2016-01-02T10:10:34 Updated copyright to 2016
Alex Szpakowski 6ea942da 2015-07-19T19:44:40 Added MSAA support for OpenGL ES contexts on iOS. Note that extra steps must be taken when using glReadPixels to read the contents of the main OpenGL ES framebuffer on iOS, if multisampling is used. See the OpenGL ES section of README-ios.md for details.
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().
Sam Lantinga 2c4a6ea0 2015-05-26T06:27:46 Updated the copyright year to 2015
Alex Szpakowski 6c20b682 2015-05-05T16:24:05 Fixed a warning when SDL_syswm.h is included in code compiled for iOS with clang.
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.
Alex Szpakowski fe6c797c 2015-04-10T23:30:31 Fixed an iOS view orientation issue when SDL_GL_CreateContext or SDL_CreateRenderer is called.
Alex Szpakowski c4035654 2015-04-09T19:28:00 Added framebuffer and colorbuffer members to the uikit portion of the SDL_SysWMinfo struct, removed SDL_iOSGetViewRenderbuffer and SDL_iOSGetViewFramebuffer.
Ryan C. Gordon 331a434f 2015-03-23T19:47:08 Windows: Report window HDC in SDL_SysWMinfo. Fixes Bugzilla #2668.
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
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!
Philipp Wiesemann 9c398852 2014-11-22T22:20:40 Corrected header file documentation comment.
J?rgen P. Tjern? 498690ff 2014-09-30T11:20:50 Mac: Fix build with clang from Xcode 6.
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
Sam Lantinga 2d2f9020 2014-08-19T22:04:54 Better check for __has_feature
Sam Lantinga eba65c66 2014-08-19T21:17:21 Fixed bug 2694 - configure bug __has_feature macro not detected skaller using gcc 4.2 (the default) on Mac OSX 10.6.8 CC build/SDL_dynapi.lo In file included from /Users/johnskaller/SDL/src/dynapi/SDL_dynapi.c:31: include/SDL_syswm.h:211:39: error: missing binary operator before token "(" The fault appears to be here: #if defined(__OBJC__) && __has_feature(objc_arc) that the __has_feature macro is not supported by gcc 4.2. The code works fine with my clang 3.3svn.
Alex Szpakowski f5543f93 2014-08-06T03:24:16 Updated the iOS backend code to use Objective-C's automatic reference counting (ARC).
Ryan C. Gordon 5b780063 2014-07-30T14:14:19 Make SDL_SysWMinfo usable on Mac/iOS with ARC enabled (thanks, Alex!). Fixes Bugzilla #2641.
Alex Szpakowski 734b5233 2014-07-14T16:50:25 Misc. iOS code improvements. - Use @autoreleasepool instead of NSAutoReleasePool. - Code style fixups.
J?rgen P. Tjern? 744d4f02 2014-06-30T17:22:08 Apply WIN32_LEAN_AND_MEAN redefine fix to SDL_syswm.h too. This is related to 36ffc47b6033, which fixes bug 2508.
J?rgen P. Tjern? d3418446 2014-06-04T10:33:23 SDL_opengl: Fix Mac build for SDK 10.9 too.
Sam Lantinga 32665131 2014-06-02T09:01:26 Added a way to get the native Android window and EGL context
Ryan C. Gordon cb403ab6 2014-04-29T12:00:28 Removed comma at end of enum in a public header, to make -Wpedantic happy.
Brandon Schaefer ae2a50fc 2014-04-21T12:42:25 Revert MIR_CFLAGS to SDL_CFLAGS. Use forward declaration for the real fix. (We shouldn't expose mir headers!)
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.
Sam Lantinga e99dc1f1 2014-03-10T19:11:52 Fixed binary compatibility with the new Windows RT support
Sam Lantinga 1367bf87 2014-03-09T11:36:47 Integrated David Ludwig's support for Windows RT
Ryan C. Gordon 6bc29770 2014-02-02T23:53:48 Added some SysWM bits for Mir.
Ryan C. Gordon 19f8c622 2014-02-02T23:41:46 Added Mir video target (thanks, Brandon!).
Sam Lantinga 58edac3e 2014-02-02T00:53:27 Fixed bug 2374 - Update copyright for 2014... Is it that time already??
Gabriel Jacobo 682bc47b 2014-01-28T09:13:46 Preserve binary compatibility in SDL_SYSWM_TYPE (thanks Gerry JJ!) Also moved Wayland structures to the bottom of the union for OCD related issues.
Gabriel Jacobo ec1cb49e 2013-12-14T20:18:43 Wayland support Based on the original port to Wayland by: Joel Teichroeb, Benjamin Franzke, Scott Moreau, et al. Additional changes in this commit, done by me: * Wayland uses the common EGL framework * EGL can now create a desktop OpenGL context * testgl2 loads GL functions dynamically, no need to link to libGL anymore * Assorted fixes to the Wayland backend Tested on the Weston Compositor (v1.0.5) that ships with Ubuntu 13.10, running Weston under X. Tests ran: testrendercopyex (all backends), testgl2, testgles2,testintersections
Gabriel Jacobo f848adff 2013-11-29T10:06:08 Improve Android pause/resume behavior.
David Ludwig 0022dbf2 2013-09-16T11:02:18 WinRT: made SDL_GetWindowWMInfo return window data in a slightly easier-to-use format Having the window pointer available as a WinRT IInspectable should make it a bit easier to use in conjunction with WRL-based weak references.
David Ludwig 1e78c4a5 2013-08-27T12:20:35 WinRT: more "Windows RT" to "WinRT" renaming
David Ludwig 7be2ad71 2013-08-27T11:44:43 WinRT: renamed SDL_SYSWM_WINDOWSRT to SDL_SYSWM_WINRT This is part of an overall effort to use the name, "WinRT", rather than "WindowsRT" (or "Windows RT"), as the shorthand name often seems to mean something different than the longhand name. (WinRT is an API, Windows RT is a product name)
David Ludwig f7049b93 2013-08-12T22:29:55 WinRT: merged with SDL 2.0.0 codebase (aka. SDL hg rev d4ce48ff30d1)
Gabriel Jacobo dad42067 2013-08-12T11:13:50 Fixes #2022, do not resume on Android when surfaceChanged If the app is in landscape mode and the user presses the power button, a pause is followed immediately by a surfaceChanged event because the lock screen is shown in portrait mode. This triggers a "false" resume. So, we just pause and resume following the onWindowFocusChanged events. Also, wait for SDL_APP_WILLENTERBACKGROUND and SDL_APP_DIDENTERBACKGROUND before blocking the event pump.
Sam Lantinga 1ad936eb 2013-08-11T19:56:43 Fixed bug 2027 - Full-screen appears to be broken - hang in SDL_DestroyWindow() Rainer Deyke I'm running Linux Mint 15 with the Cinnamon window manager. SDL_DestroyWindow consistently locks up for me when the window if fullscreen.