|
ea595800
|
2022-10-03T18:31:15
|
|
wayland: Set the damage buffer size when supported
The preferred method for setting the damage region on compositor protocol versions 4 and above is to use wl_surface.damage_buffer. Use this when available and only fall back to wl_surface.damage on older versions.
Bumps the highest supported version of wl_compositor to version 4.
|
|
a8cb7bbe
|
2022-10-01T11:31:26
|
|
wayland: Add dedupe logic to window geometry configuration
Adds deduplication logic to ConfigureWindowGeometry() to avoid setting redundant backbuffer, viewport and surface opaque region dimensions. State is now only set when the window and/or backbuffer dimensions change.
This repurposes the viewport rect to always hold the actual size of the window, which can differ from the SDL size if things are being scaled. The SDL_Rect was removed in favor of two ints, as the x/y members of the struct were never used, so they just wasted space.
Since the internal variables always have the true window size, the width/height getter functions are no longer required and can be removed.
|
|
914a65e0
|
2022-10-06T12:39:36
|
|
wayland: Don't unset min/max values when entering fullscreen via a compositor event
If the compositor is entering fullscreen and hasn't removed any constraints itself, it's already too late at this point. Remove the unnecessary call.
Restoring the limits when exiting fullscreen is still required, though, as they may have been removed when entering fullscreen via an SDL request.
|
|
69cf5fb0
|
2022-10-04T13:09:35
|
|
wayland: Remove surface type helpers
These were remnants of a time before the surface type was explicitly stored, so they can be removed per the TODO note.
|
|
c2b0c41c
|
2022-10-04T12:59:26
|
|
wayland: Set/unset the opaque regions on surfaces when transparency is toggled
Caches the SDL_HINT_VIDEO_EGL_ALLOW_TRANSPARENCY hint at init time and registers a callback, which is fired when the hint is changed during runtime and toggles the opaque region for existing surfaces.
|
|
d2160c29
|
2022-10-05T21:42:26
|
|
iOS: implement SDL_GetWindowSizeInPixels.
|
|
92c71ae3
|
2022-10-05T21:59:08
|
|
[iOS] respect initial status bar configuration when displaying the launch storyboard
|
|
5b131364
|
2022-08-06T10:48:53
|
|
[UIKit] handle app lifecycle events in a custom object instead of AppDelegate
removes the need to call SDL counterparts manually when custom AppDelegate is used
|
|
eac3d6d3
|
2022-10-04T10:46:42
|
|
SDL_video.c: fix variable 'i' may be uninitialized when used here "_this->name = bootstrap[i]->name;"
|
|
ad29875e
|
2022-04-18T17:03:05
|
|
Wayland: Emulate mouse warp using relative mouse mode
Several games (including Source and GoldSrc games, and Bioshock
Infinite) attempt to "fake" relative mouse mode by repeatedly warping
the cursor to the centre of the screen. Since mouse warping is not
supported under Wayland, the viewport ends up "stuck" in a rectangular
area.
Detect this case (mouse warp while the cursor is not visible), and
enable relative mouse mode, which tracks the cursor position
independently, and so can Warp successfully.
This is behind the SDL_HINT_VIDEO_WAYLAND_EMULATE_MOUSE_WARP hint, which
is enabled by default, unless the application enables relative mouse
mode itself using SDL_SetRelativeMouseMode(SDL_TRUE).
Note that there is a behavoural difference, in that relative mouse mode
typically doesn't take mouse accelleration into account, but the
repeated-warping technique does, so mouse movement can seem very slow
with this (unless the game has its own mouse accelleration option, such
as in Portal 2).
|
|
9e3c4b9f
|
2022-10-03T17:50:01
|
|
Use the correct platform defines
|
|
f8f562da
|
2022-10-02T22:55:49
|
|
iOS: remove dead pre-iOS 8 codepaths.
SDL hasn't supported those older iOS versions for a little while now.
|
|
bbeacd72
|
2022-10-02T22:57:03
|
|
Fix some credit comments.
|
|
5e654a4b
|
2022-10-01T16:10:46
|
|
Fixed Mac compile errors when OpenGL is disabled.
|
|
28572702
|
2022-09-30T17:25:57
|
|
Properly backspace over text that was entered when autocorrect updates text with the iPhone on-screen keyboard
|
|
e17f0c28
|
2022-09-27T10:59:28
|
|
wayland: Call the Wayland hide/show functions directly when changing decoration modes
Calling SDL_HideWindow() to destroy the window is a NOP if the SDL_WINDOW_SHOWN flag was never set. Bypass it and call the Wayland-specific function directly to ensure that the window is always destroyed before switching from server-side to client-side decorations, even if it hasn't been shown yet.
Likewise, call Wayland_ShowWindow() directly when the window isn't explicitly hidden to ensure that it is always recreated since the SDL_WINDOW_SHOWN flag won't be cleared, which, when set, renders SDL_ShowWindow() a NOP.
|
|
57b5c910
|
2022-09-28T12:38:32
|
|
kmsdrm: only negative devindex's are not allowed
ad874536 removed an unnecessary limit as we *can* have a devindex
greater than 99, this error message does not reflect the support for
values greater than 99.
|
|
a2c57573
|
2022-09-01T10:47:24
|
|
video: check for "software" with SDL_HINT_FRAMEBUFFER_ACCELERATION.
We check for this value elsewhere but not in SDL_CreateWindowFramebuffer.
|
|
57b20e7b
|
2022-09-27T14:23:42
|
|
cocoa: Fix new windows setting SDL_WINDOW_BORDERLESS flag incorrectly.
Fixes #6172.
|
|
d71df644
|
2022-09-27T10:21:15
|
|
Fixed bug #6287 - SDL_FillRect failed for SDL_Surface with BitsPerPixel == 4
|
|
4a06cc0f
|
2022-09-22T13:03:09
|
|
wayland: Apply modifier changes to the text of repeated keys
The text component of a repeated keystroke is initially set when a key is first pressed and the cached value remains static until the repeated key is released and another repeatable key is pressed. If the state of a modifier such as shift or capslock is changed while a key is being repeated, the text emitted will not have the modifier applied to it until the repeated key is released and pressed again.
Update the text to be repeated by a key if a modifier is changed while a key is actively being repeated.
|
|
467c82c7
|
2022-09-23T12:31:40
|
|
wayland: Add mappings for the Escape and NumLock keys
The XKB keysym to SDL keycode mappings were missing for the Escape and NumLock keys, which prevented them from being remapped. Add them to the table so that the remapping of these keys will work.
|
|
5ea9886b
|
2022-09-23T13:19:22
|
|
haiku: Fix when screen color depth was 24 bits, SDL_GetWindowSurface would always fail with 'Unknown pixel format' error
Note that returning SDL_PIXELFORMAT_BGR24 instead of SDL_PIXELFORMAT_RGB24 seems necessary, otherwise when running with SDL_ACCELERATION=0, the red and blue channels of the window appeared swapped.
Note that when running with acceleration enabled, red and blue channel swapping does not happen regardless of whether SDL_PIXEL_FORMAT_RGB24 or SDL_PIXEL_FORMAT_BGR24 is returned.
For good measure, I also tested running with acceleration disabled in both 15 and 16 bit color depths, but red and blue channel swapping did not occur
|
|
399cb2f0
|
2022-09-21T13:20:39
|
|
wayland: Only clear the key repeat flag when the repeated key is released
If multiple keys were simultaneously depressed and one was being repeated, the repeat flag was being cleared when any of the pressed keys were released, even if the released key wasn't the one being repeated.
This tracks the key currently being repeated and only clears the repeat flag when the particular key being repeated is released.
|
|
301912a5
|
2022-09-18T21:25:55
|
|
Fix: Use WIN_ClientPointToSDL for converting additional mouse coordinates
|
|
8598f05b
|
2022-09-17T21:45:08
|
|
Support loading 2bpp .bmp files
|
|
1f7a7fd9
|
2022-09-17T21:30:40
|
|
haiku: Combine HAIKU_ColorSpaceToBitsPerPixel and HAIKU_BPPToSDLPxFormat
|
|
43fc6d59
|
2022-09-08T15:53:54
|
|
Fix incorrect return value in X11_GetPixelFormatFromVisualInfo
|
|
5fba31f6
|
2022-09-17T00:51:00
|
|
SDL_HasPrimarySelectionText: fix -Wunreachable-code-return warning.
|
|
efe01faa
|
2022-09-16T10:08:31
|
|
Replaced Blit4to4CopyAlpha() with optimized SDL_BlitCopy()
Fixes https://github.com/libsdl-org/SDL/issues/6241
|
|
c0baa6bf
|
2022-09-16T20:03:50
|
|
move SDL_windowstaskdialog.h contents into SDL_windowsmessagebox.c
Silences clang -Wpragma warnings:
D:/a/SDL/SDL/src/video/windows/SDL_windowstaskdialog.h:21:10: warning: the current #pragma pack alignment value is modified in the included file [-Wpragma-pack]
#include <pshpack1.h>
^
D:/a/_temp/msys64/clang64/include/pshpack1.h:7:9: note: previous '#pragma pack' directive that modifies alignment is here
#pragma pack(push,1)
^
In file included from D:/a/SDL/SDL/src/video/windows/SDL_windowsmessagebox.c:35:
D:/a/SDL/SDL/src/video/windows/SDL_windowstaskdialog.h:156:10: warning: the current #pragma pack alignment value is modified in the included file [-Wpragma-pack]
#include <poppack.h>
^
note: previous '#pragma pack' directive that modifies alignment is here
2 warnings generated.
Closes: https://github.com/libsdl-org/SDL/issues/6240
|
|
d744aafb
|
2022-09-15T01:00:12
|
|
Added support for simulated vsync in the renderer
This kicks in if the platform doesn't support vsync directly, or if the present fails for some reason (e.g. minimized on some platforms)
Fixes https://github.com/libsdl-org/SDL/issues/5134
|
|
d86cb8ec
|
2022-09-16T17:05:02
|
|
SDL_offscreenwindow.c: swap include order of SDL_egl_c.h/SDL_sysvideo.h
Fixes redefinition warnings from windows builds.
Reference issue: https://github.com/libsdl-org/SDL/issues/6239
|
|
6de15ffc
|
2022-09-15T12:04:08
|
|
Fixed building offscreen video driver without EGL support
Also did miscellaneous style cleanup for consistency with other code
|
|
ac5b9bc4
|
2022-09-14T18:28:35
|
|
Add support for X11 primary selection (#6132)
X11 has a so-called primary selection, which you can use by marking text and middle-clicking elsewhere to copy the marked text.
There are 3 new API functions in `SDL_clipboard.h`, which work exactly like their clipboard equivalents.
## Test Instructions
* Run the tests (just a copy of the clipboard tests): `$ ./test/testautomation --filter Clipboard`
* Build and run this small application:
<details>
```C
#include <SDL.h>
#include <unistd.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
void print_error(const char *where)
{
const char *errstr = SDL_GetError();
if (errstr == NULL || errstr[0] == '\0')
return;
fprintf(stderr, "SDL Error after '%s': %s\n", where, errstr);
SDL_ClearError();
}
int main()
{
char text_buf[256];
srand(time(NULL));
SDL_Init(SDL_INIT_VIDEO);
print_error("SDL_INIT()");
SDL_Window *window = SDL_CreateWindow("Primary Selection Test", SDL_WINDOWPOS_UNDEFINED,
SDL_WINDOWPOS_UNDEFINED, 400, 400, SDL_WINDOW_SHOWN);
print_error("SDL_CreateWindow()");
SDL_Renderer *renderer = SDL_CreateRenderer(window, -1, SDL_RENDERER_ACCELERATED);
print_error("SDL_CreateRenderer()");
bool quit = false;
unsigned int do_render = 0;
while (!quit) {
SDL_Event event;
while (SDL_PollEvent(&event)) {
print_error("SDL_PollEvent()");
switch (event.type) {
case SDL_QUIT: {
quit = true;
break;
} case SDL_KEYDOWN: {
switch (event.key.keysym.sym) {
case SDLK_ESCAPE:
case SDLK_q:
quit = true;
break;
case SDLK_c:
snprintf(text_buf, sizeof(text_buf), "foo%d", rand());
SDL_SetClipboardText(text_buf);
print_error("SDL_SetClipboardText()");
printf("clipboard: set_to=\"%s\"\n", text_buf);
break;
case SDLK_v: {
printf("clipboard: has=%d, ", SDL_HasClipboardText());
print_error("SDL_HasClipboardText()");
char *text = SDL_GetClipboardText();
print_error("SDL_GetClipboardText()");
printf("text=\"%s\"\n", text);
SDL_free(text);
break;
} case SDLK_d:
snprintf(text_buf, sizeof(text_buf), "bar%d", rand());
SDL_SetPrimarySelectionText(text_buf);
print_error("SDL_SetPrimarySelectionText()");
printf("primselec: set_to=\"%s\"\n", text_buf);
break;
case SDLK_f: {
printf("primselec: has=%d, ", SDL_HasPrimarySelectionText());
print_error("SDL_HasPrimarySelectionText()");
char *text = SDL_GetPrimarySelectionText();
print_error("SDL_GetPrimarySelectionText()");
printf("text=\"%s\"\n", text);
SDL_free(text);
break;
} default:
break;
}
break;
} default: {
break;
}}
}
// create less noise with WAYLAND_DEBUG=1
if (do_render == 0) {
SDL_RenderPresent(renderer);
print_error("SDL_RenderPresent()");
}
do_render += 1;
usleep(12000);
}
SDL_DestroyRenderer(renderer);
SDL_DestroyWindow(window);
SDL_Quit();
print_error("quit");
return 0;
}
```
</details>
* Use c,v,d,f to get and set the clipboard and primary selection.
* Mark text and middle-click also in other applications.
* For wayland under x:
* `$ mutter --wayland --no-x11 --nested`
* `$ XDG_SESSION_TYPE=wayland SDL_VIDEODRIVER=wayland ./<path_to_test_appl_binary>`
|
|
72fe6cc8
|
2022-09-14T09:14:47
|
|
Updated to the latest version of OpenGL and Vulkan headers from the Khronos registry
Fixes https://github.com/libsdl-org/SDL/issues/6193
|
|
228b9fb5
|
2022-09-14T03:43:16
|
|
Update SDL_windowswindow.c (#6225)
Clip rectangle set to int(left+width/2) , int(top+height/2) , int(left+width/2)+1 , int(top+height/2)+1
a 1x1 box
On even-valued resolution, cursor is stable at bottom-right central pixel
On odd-valued resolution, cursor is stable at exact central pixel.
this is the desired behaviour
|
|
929d5b80
|
2022-09-12T22:39:44
|
|
wayland: Use the backbuffer size for determining if a resize event is required
In some cases, a backbuffer size update may not be accompanied by a resize event if the window size and/or scale were updated before the new backbuffer size was recomputed. Instead of the scale, use the old/new backbuffer sizes to determine if a resize event is required so that a backbuffer size change will always be followed by a resize event.
|
|
edfb00c2
|
2022-09-09T14:26:44
|
|
wayland: Only commit on move if the display was changed
Only commit on a move event if the display was changed for a fullscreen window and the compositor has returned bad dimensions.
|
|
97a5e744
|
2022-09-06T17:08:27
|
|
wayland: Remove duplicate code
Wayland_SetWindowSize() can be simplified with the common CommitWindowGeometry() function.
|
|
78f843f7
|
2022-09-06T13:19:23
|
|
wayland: Remove unnecessary function parameter
SetFullscreen() is never called in a case where the commit parameter is false anymore, so the parameter is unnecessary.
|
|
69e4c770
|
2022-09-04T12:18:38
|
|
video: Make the mode switching function a NOP if mode switching is disabled
Instead of wrapping individual calls to SDL_SetDisplayModeForDisplay(), just check the flag in the function itself and make it a NOP that cannot fail if the flag is set. Silences some errant "SDL video driver doesn't support changing display mode" log errors.
|
|
768b6728
|
2022-09-04T23:39:05
|
|
wayland: Compare against the old scale when resizing
Compare against the old scale instead of the new or the conditional will always be true.
|
|
07aea476
|
2022-09-03T13:30:49
|
|
wayland: Ignore content sizes from libdecor when hiding a window
When hiding a window, libdecor can report bogus content region sizes that are +/- the height of the title bar. Ignore any size values from libdecor when hiding a window, or the size may be incorrect when restored.
|
|
6de12b4a
|
2022-09-06T13:30:19
|
|
wayland: Update the internal state when the compositor moves a fullscreen window
The compositor can arbitrarily move windows between displays, including fullscreen windows. Update the internal state when a fullscreen window is moved so the internal SDL state accurately reflects the window location, and resize the window to fit the new display.
This also fixes an edge case where the compositor can make a window fullscreen on a different display than SDL thinks it will be on (usually when a window is made fullscreen by the compositor while straddling multiple displays), which can result in the window being incorrectly sized.
|
|
a7d34595
|
2022-09-03T13:11:29
|
|
wayland: Trigger a commit on fullscreen update
If additional fullscreen requests are received when the window is already fullscreen, it is typically due to the fullscreen flags or emulated video mode being changed. A commit must be explicitly triggered or the requested changes won't take effect until some other event, such as a resize or focus change, causes the changes to be committed.
|
|
707b561f
|
2022-09-03T12:37:02
|
|
wayland: Enable compositor fullscreen toggling
The compositor can toggle the fullscreen state (via a hotkey or otherwise), so the internal SDL state must be updated accordingly when it does.
When toggling fullscreen via the compositor, SDL will attempt to use the last fullscreen flag explicitly set. If no flag was previously set, SDL_WINDOW_FULLSCREEN will be used if a window video mode was set, otherwise SDL_WINDOW_FULLSCREEN_DESKTOP will be used. If the previous flag was SDL_WINDOW_FULLSCREEN and the window video mode was cleared, it will revert to SDL_WINDOW_FULLSCREEN_DESKTOP.
|
|
31979e2d
|
2022-09-02T18:41:21
|
|
wayland: Add missing static qualifiers
|
|
1c88a052
|
2022-09-09T16:03:17
|
|
Update Wayland cursors to match X11 cursors
|
|
5ffede35
|
2022-09-06T19:56:29
|
|
Fix https://github.com/libsdl-org/SDL/issues/6191
|
|
03485db0
|
2022-09-03T23:40:14
|
|
Android: understand HAL_PIXEL_FORMAT_BGR_565 as a returned value from ANativeWindow_getFormat() (see #6016)
|
|
371735e9
|
2022-08-30T15:45:16
|
|
Silence unused variable warning
SDL_x11dyn.c:123:17: warning: unused variable 'i' [-Wunused-variable]
int i;
^
|
|
b8af865f
|
2022-08-28T13:02:57
|
|
Fix candidate list size for Windows IME
Adjust candidate count so list is not draw bigger that needed. This also fix potential uninitialised read of variable `candsize[i]` if `vertical` is false.
|
|
9ce9c253
|
2022-08-25T18:41:32
|
|
SDL_windowsmodes: fix WIN_GetDisplayNameVista source identifier number
This was getting the wrong monitor's name because the source identifier
was not being included in the DisplayConfigGetDeviceInfo request.
|
|
ce227aa6
|
2022-08-26T01:57:09
|
|
wayland: fix build with SDL_WAYLAND_SHARED=OFF/--enable-wayland-shared=no
|
|
40b24992
|
2022-08-25T10:03:33
|
|
Fix building with SDL_DISABLE_WINDOWS_IME
Regression of https://github.com/libsdl-org/SDL/commit/f317d619ccd22e60cebf1b09d716d3985359c981#diff-bff8f3e638d51e86cb6f0f42e2c527549d649951b7aa5ec4a539e865a5b57027R398
|
|
00452e47
|
2022-08-24T11:25:13
|
|
Adding SDL_GetWindowSizeInPixels for window size in pixels (#6112)
|
|
5f79cd16
|
2022-08-24T18:50:02
|
|
Fixed spacing
|
|
dd68eb5c
|
2022-08-24T17:57:52
|
|
free drm prop before returning
|
|
aae566e1
|
2022-08-23T02:26:29
|
|
Use SDL_bool
|
|
e3ea9b5b
|
2022-08-23T00:37:43
|
|
restore vrr state on exit
|
|
450e9857
|
2022-08-22T17:58:41
|
|
Use SDL_TRUE and SDL_FALSE
|
|
605b50fc
|
2022-08-22T17:49:49
|
|
kmsdrm: added missing checks
|
|
20715fa0
|
2022-08-22T17:09:42
|
|
Fixed build errors
|
|
92b3c53c
|
2022-08-22T16:25:25
|
|
Added a hint SDL_HINT_MOUSE_RELATIVE_SYSTEM_SCALE to control whether to use system mouse acceleration on raw relative motion.
This is currently only implemented on Windows, and "Enhanced pointer
precision" mode is not quite correct.
|
|
d166f5ef
|
2022-08-22T14:10:54
|
|
Fixed uninitialized variable warning
|
|
b204db1e
|
2022-08-21T18:06:11
|
|
cocoa: change Shape data to use ObjC objects instead of C structs.
Fixes #6089
|
|
057086e3
|
2022-07-15T13:44:49
|
|
wayland: Add high resolution scroll wheel support
Update the Wayland core protocol spec file and add support for the new axis_value120 event to handle high resolution scroll wheels.
The axis_value120 replaces the axis_discrete event, which is no longer sent as of version 8 of the protocol. Note that unlike the axis_discrete event, no mention in the spec is made regarding how many axis_value120 events may occur per-axis per-frame, so the values are accumulated and committed when the pointer frame event occurs.
|
|
d731ad76
|
2022-07-15T10:44:38
|
|
wayland: Fix include order when building with libdecor
The libdecor header internally includes wayland-client.h, which pulls in the wayland-client-protocol.h file from the system include path and overrides the local one generated from the included Wayland protocol spec files. Move the Wayland protocol header inclusion above the libdecor header inclusion to ensure that the locally generated protocol header is used instead.
|
|
4ca7b378
|
2022-08-21T11:35:14
|
|
x11: Specify windowed dimensions when creating fullscreen windows.
This lets the window manager adjust the window correctly if it ever
leaves fullscreen mode.
Fixes #5725.
|
|
ffab1396
|
2022-08-19T17:28:31
|
|
Fixed minimized window detection when handling WM_WINDOWPOSCHANGED
When minimizing a window, we get this sequence of events:
WM_WINDOWPOSCHANGING
WM_GETMINMAXINFO
WM_NCCALCSIZE
WM_WINDOWPOSCHANGED - IsIconic() is true
WM_MOVE
WM_SIZE - SDL sees minimized state here
When restoring a window, we get this sequence of events:
WM_WINDOWPOSCHANGING
WM_GETMINMAXINFO
WM_NCCALCSIZE
WM_NCPAINT
WM_ERASEBKGND
WM_WINDOWPOSCHANGED - IsIconic() is false
WM_MOVE
WM_SIZE - SDL sees restored state here
On Windows 10 a minimized window has a non-empty client rect, so we were delivering a minimized size before SDL knows that the window is minimized, and then ignoring the restored size when handling the restore message.
The fix is to use IsIconic() which returns the correct window state when WM_WINDOWPOSCHANGED is actually delivered.
|
|
2b93f6e1
|
2022-05-20T09:55:06
|
|
cocoa/uikit: Use VK_EXT_metal_surface in Vulkan_GetInstanceExtensions
Replaces VK_MVK_macos_surface and VK_MVK_ios_surface
|
|
029a9b2f
|
2022-05-19T12:57:35
|
|
cocoa/uikit: Support VK_EXT_metal_surface
Uses VK_EXT_metal_surface (vkCreateMetalSurfaceEXT)
when possible, otherwise falls back to the obsoleted
VK_MVK_macos_surface and VK_MVK_ios_surface.
Fixes #3906
|
|
ad874536
|
2022-08-17T14:56:18
|
|
kmsdrm: enable vrr on displays that support it
|
|
6e007c36
|
2022-08-18T19:05:55
|
|
Add null termination to Wayland_data_source_get_data() if requested
Fixes https://github.com/libsdl-org/SDL/issues/6083
|
|
948dbe7d
|
2022-08-18T16:24:20
|
|
Don't include the null terminator in Wayland clipboard text
Fixes https://github.com/libsdl-org/SDL/issues/6083
|
|
3bae2d57
|
2022-08-18T12:39:47
|
|
wayland: Set the libdecor app ID after visibility calls
Set the frame app ID after toggling visibility or the name displayed in window manager task switchers may not display correctly.
|
|
8acb4e45
|
2022-08-17T14:25:30
|
|
Fixed interactions between mouse capture and grab on X11
Fixes https://github.com/libsdl-org/SDL/issues/6072
|
|
7da74eb5
|
2022-08-17T14:59:23
|
|
wayland: Never commit with an undefined window title
If libdecor performs a commit with the frame title being undefined, a crash can occur within the library or its plugins. Always ensure that the title is set to a valid string to avoid this.
|
|
2fcd8f88
|
2022-08-16T14:19:26
|
|
Handle SDL_PIXELFORMAT_EXTERNAL_OES in SDL_GetPixelFormatName()
|
|
26948f01
|
2022-08-15T20:09:09
|
|
cocoa: Make SDL_MinimizeWindow() work with borderless windows.
Fixes #6046.
|
|
650612fd
|
2022-08-13T16:54:27
|
|
wayland: Eliminate excessive calls to SetFullscreen
Eliminate excessive calls to SetFullscreen by removing the calls in the libdecor and xdg-toplevel config callbacks.
These calls were being made there in case something explicitly called the window minimization function from within SDL, which unsets fullscreen, and as minimizing a window in Wayland is just a suggestion to the compositor and doesn't actually change the window state or communicate anything back to the application, it was necessary to call SetFullscreen in every call to the config functions just in case something minimized a window via SDL_MinimizeWindow() and later needed to restore it. GNOME in particular had issues when fullscreen set/unset operations were being hammered, leading to overlapping acks and commits when switching to fullscreen.
With the new video system flag to disable unsetting fullscreen when minimizing a window, these calls in the configuration functions are no longer needed and can be removed. This significantly reduces calls to the SetFullscreen() function, reverts #6044 while fixing the issue, and fixes a similar problem when hiding and showing a window initially created with fullscreen flags.
|
|
cc9cc202
|
2022-08-13T16:43:15
|
|
video: Add video device quirk flags and apply them to the video subsystem
Add quirk flags to the video device struct and add flags to allow video backend drivers to disable mode switching and disable unsetting the fullscreen mode when minimizing a window. As certain platforms can have multiple video backends compiled in at once, #ifdefs, as used by other platforms, aren't suitable as different backends on the same platform may not need the same quirks.
This replaces the formerly dedicated 'disable_display_mode_switching' boolean as additional quirks are needed by the Wayland backend. Helper functions have also been added to simplify reading the flag states.
|
|
0cc8dfdb
|
2022-08-15T07:44:56
|
|
Added SDL_system.h for the declaration of SDL_iPhoneSetAnimationCallback() and SDL_iPhoneSetEventPump()
|
|
74bdb211
|
2022-08-12T22:01:12
|
|
wayland: Don't roundtrip in ShowWindow unless restoring a hidden window
Don't call the roundtrip in ShowWindow unless restoring a previously hidden window. This fixes a regression in GNOME when creating a window with the fullscreen flag set, as the fullscreen window will be positioned down the screen by the height of the top bar if the window is made fullscreen on the primary display and the roundtrip is called when initially displaying the window.
|
|
3046d55d
|
2022-08-12T22:02:26
|
|
cocoa: Return an error if GetWindowDisplayIndex() is called too early
SDL_CreateWindow() may call GetWindowDisplayIndex() to compute the position
of a new window that the caller has requested to be placed on a certain
display. Since we haven't fully constructed the window yet, our driverdata
will be nil and we will fail to get the NSScreen (which is fine). However,
we need to return an error (not 0, which is a valid display index) for
SDL_GetWindowDisplayIndex() to know to figure out the display index itself.
Fixes positioning new windows on secondary displays when using
SDL_WINDOWPOS_CENTERED_DISPLAY() and SDL_WINDOWPOS_UNDEFINED_DISPLAY().
|
|
08d17f47
|
2022-08-12T20:26:23
|
|
Removed unused variable
|
|
be0cf257
|
2022-08-12T18:13:42
|
|
Only force the resize event in the DPI changed case
OpenGL windows don't actually get the WM_WINDOWPOSCHANGED event in the SetWindowPos() call in WIN_SetWindowFullscreen(), so setting the window size to zero never gets reset and we're stuck with a zero sized window.
Instead, just force the resize event in WM_DPICHANGED handling, where we know we need it. If we end up needing to force it in WIN_SetWindowFullscreen(), just set a flag in the window data and respond to that in WM_WINDOWPOSCHANGED, but that's a fairly risky behavior change as suddenly all applications would start getting SDL_WINDOWEVENT_SIZE_CHANGED when going fullscreen, and they may respond to that in expensive and potentially disruptive ways.
For later we'll probably create a DPI changed event and respond to that in the renderer instead of this window size changed hack.
This fixes https://github.com/libsdl-org/SDL/issues/6033 @ericwa
|
|
1b08cd20
|
2022-08-12T18:55:05
|
|
wayland: Add roundtrip in SetWindowFullscreen() to get new size
The video core assumes that window->w/h will be updated before returning
from SetWindowFullscreen(). This is needed to generate a resize event
with the correct window size when exiting fullscreen.
The roundtrip allows us to receive the configure callback that informs
us of the new window size before returning.
Fixes #6043
|
|
780b031b
|
2022-08-12T16:39:39
|
|
wayland: Avoid duplicate resize events when entering fullscreen
|
|
a1e34b5e
|
2022-08-11T08:52:51
|
|
Don't send a resize event when the window is resized to the dock icon
Partially addresses https://github.com/libsdl-org/SDL/issues/6033
|
|
5f682e77
|
2022-08-10T20:01:15
|
|
wayland: Remove freed display from `SDL_WaylandOutputData->output_list`
|
|
3119d58f
|
2022-08-10T10:48:23
|
|
cocoa: Change the new sync_dispatch hint to async_dispatch.
This is so the default is safer.
|
|
c6c0a839
|
2022-08-10T09:54:49
|
|
windows: If a display's friendly name is blank, try the generic name.
Fixes #6031.
|
|
bdc7f958
|
2022-08-10T00:41:25
|
|
cocoa: Added hint to treat MacBook trackpads as touch devices, not mice.
Fixes #5511.
|
|
b4660e9d
|
2022-08-10T03:40:00
|
|
macOS: Add hint for blocking thread on OpenGL context update dispatch (#5708)
|
|
a346c4bb
|
2022-08-09T15:41:02
|
|
egl: Add support for SDL_GL_FLOATBUFFERS.
Fixes #6001.
|
|
b599205d
|
2022-08-09T09:50:55
|
|
x11: Don't look up xinput2 devices unless we're in relative mode.
|
|
56c1481c
|
2022-08-08T20:33:44
|
|
cocoa: Don't mark fullscreen-desktop windows as non-resizable.
Otherwise, we can't tile SDL apps in Spaces.
Fixes #4883.
|
|
7530bd74
|
2022-08-08T11:26:55
|
|
Fix right, bottom computation in `SDL_GetClosestPointOnRect` which should be exclusive, not inclusive
|