|
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
|
|
98bac00d
|
2022-08-08T11:26:52
|
|
Add `SDL_GetPointDisplayIndex` and `SDL_GetRectDisplayIndex` and re-implement `SDL_GetWindowDisplayIndex` in terms of `SDL_GetRectDisplayIndex`
- This allows looking up the display index for an arbitrary location rather than requiring an active window to do so.
- This change also reimplements the fallback display lookup that found the display with center closest to the window's center to instead find the display rect edge
closest to the window center (this was done in the almost identical display lookup used in SDL_windowsmodes.c, which now uses `SDL_GetPointDisplayIndex`). In
practice this should almost never be hit as it requires the window's center to not be enclosed by any display rect.
|
|
0bcbdfe2
|
2022-06-23T16:10:41
|
|
video: dummy: Support evdev psuedo-device with no video.
|
|
dd2e3182
|
2022-08-06T12:31:06
|
|
wayland: Use libdecor visibility toggle for hiding/showing the window
The current method of toggling the libdecor window visibility by destroying and recreating the frame results in a race where a use-after-free bug can manifest itself within libdecor when window visibility is toggled quickly. Instead, use the libdecor function for toggling visibility instead of destroying and recreating the frame every time.
|
|
f600364b
|
2022-08-06T09:19:52
|
|
wayland: Mark window as MOUSE_CAPTURE while a mouse button is down.
Wayland works like SDL's "auto capture" feature already, tracking the mouse
globally only while a drag is occuring, and this is the only way to get mouse
input outside the window.
Setting this flag ourselves lets SDL_CaptureMouse() work in the most common
use case without actually implementing CaptureMouse for the backend, including
SDL's auto capture feature.
Fixes #6010.
|
|
a6179e85
|
2022-08-05T21:23:39
|
|
wayland: Don't double-free clipboard sources if ours gets cancelled.
Fixes #6007.
|
|
3685c64e
|
2022-08-05T16:16:31
|
|
wayland: Round trip after window show/hide operations.
Perform a round trip after showing/hiding the window to avoid protocol errors when ShowWindow() is called immediately after HideWindow().
|
|
a2d3be90
|
2022-08-05T00:27:41
|
|
Implement create windows method
|
|
293d29b7
|
2022-08-04T10:11:02
|
|
SDL_x11xinput2.c: fix build for macOS
|
|
5907db56
|
2022-08-04T02:11:21
|
|
x11: Attempt to deal with XInput2 devices with absolute coordinates.
This is untested!
Reference Issue #1836.
|
|
60d1944e
|
2022-07-06T20:12:30
|
|
SDL_video: Added SDL_GL_FLOATBUFFERS to allow Cocoa GL contexts to use EDR
|
|
0b9868b0
|
2022-08-02T12:56:56
|
|
wayland: Use D-Bus to retrieve the cursor size and theme on GNOME
GNOME exposes the cursor size and theme via the org.freedesktop.portal.Settings interface of the xdg-desktop portal, so query these values via D-Bus, if available.
The XCURSOR_SIZE/XCURSOR_THEME envvars will be tried first, so as not to override any user specified sizes or themes, then D-Bus, then, failing that, it will fall back to default values.
|
|
944111db
|
2022-08-02T18:47:39
|
|
Cleaning up video driver
|
|
3f7dda8c
|
2022-08-02T18:13:55
|
|
Remove deinit of video driver
|
|
c472b8dd
|
2022-07-04T13:23:06
|
|
Whole clean around render and video driver
|
|
90e0e5c2
|
2022-06-30T19:50:22
|
|
Add point, line and rect support
|
|
2660449c
|
2022-06-30T11:44:35
|
|
Add dummy driver
|
|
a81aa992
|
2022-06-24T15:48:50
|
|
Add prim video support
|
|
46f95a7a
|
2022-06-24T00:20:11
|
|
Create dummy PS2 Video driver
|
|
602b7dd0
|
2022-08-01T17:47:26
|
|
Made the window ICMProfile filename per-window
The event no longer spams each time a window gets focus if there are windows on monitors with different color profiles.
This also has the side effect that you no longer get a color profile event at window creation, which is consistent with other events that communicate state changes.
|
|
cb107bef
|
2022-08-01T14:23:50
|
|
Fixed crash if all displays have been disconnected
Fixes https://github.com/libsdl-org/SDL/issues/5867
|
|
3a6cb7e7
|
2022-08-01T10:28:29
|
|
Convert XLookupString Latin-1 text to UTF-8
Fixes bug https://github.com/libsdl-org/SDL/issues/4699
|
|
15bcf58d
|
2022-08-01T08:14:40
|
|
Fixed memory leak in the Windows driver
|
|
17f36c10
|
2022-07-31T16:16:38
|
|
keyboard: Remove no-op calls to SDL_SetKeymap()
|
|
8b438f7b
|
2022-07-31T15:34:03
|
|
keyboard: Only send SDL_KEYMAPCHANGED when the keymap actually changes
|
|
21100006
|
2022-07-30T16:22:24
|
|
Don't conflict with usage of stdout as a stdio macro
Patch inspired by http://cvsweb.netbsd.org/bsdweb.cgi/~checkout~/pkgsrc/devel/SDL2/patches/patch-src_video_wayland_SDL__waylandmessagebox.c?rev=1.1&content-type=text/plain
|
|
dbf79405
|
2022-07-27T10:31:24
|
|
Enable capturing raw Xinput2 touch events and use to flag global mouse state as dirty
- Touch events may be translated to mouse movement events without the normal Xinput2 raw motion events
being sent. Not all touch events will necessarily move the mouse but this ensures we update the global
mouse state just in case.
- Fix up some formatting
CR: saml
|
|
42165fe8
|
2022-07-27T12:12:03
|
|
kmsdrm: slightly better device index hint parsing.
|
|
613ce785
|
2022-07-26T13:34:27
|
|
Fixed interpreting SDL_KMSDRM_DEVICE_INDEX="" as index 0
|
|
cc982ea7
|
2022-07-26T15:43:34
|
|
kmsdrm: let device indexes be > 2 digits.
|
|
1f276a51
|
2022-07-26T13:30:59
|
|
Fix Main Thread Checker warning on macOS
Cache off NSWindow's windowNumber in SDL_WindowData on setup and use that in `Cocoa_SendWakeupEvent` to prevent accessing windowNumber off the main thread.
|
|
542a4da3
|
2022-07-26T15:11:19
|
|
kmsdrm: check SDL_HINT_KMSDRM_DEVICE_INDEX hint in dri_getindex().
Otherwise, it would work for Init but not Available.
|
|
218c3dbb
|
2022-07-26T14:45:26
|
|
cocoa: Don't crash if moving a message box created before SDL_Init.
Fixes #5928.
|
|
5d85c7d3
|
2022-07-26T00:19:16
|
|
kmsdrm: Added a hint to specify device index.
Fixes #2811.
|
|
20a76b0e
|
2022-07-25T23:06:58
|
|
video: removed unused devindex argument from bootstrap's create method.
|
|
4d665017
|
2022-07-24T18:04:26
|
|
Fixed building with 10.9 SDK
Fixes https://github.com/libsdl-org/SDL/issues/5954
|
|
4d8bb89c
|
2022-07-24T11:50:14
|
|
Fixed mouse clip rect bounds on Windows
Fixes https://github.com/libsdl-org/SDL/issues/5946
|
|
6bcde52d
|
2022-07-24T20:19:16
|
|
Further adjust implementation of `Cocoa_GetWindowDisplayIndex`
As discussed in PR review, there may be an off-chance that the index
returned doesn't match up with SDL's display indexing.
This change ensures that the indices match and adds a safety check for
off-screen windows.
|
|
ce8aae14
|
2022-07-13T15:01:55
|
|
Fix `Cocoa_GetWindowDisplayIndex` failing and causing a catastrophic crash
With the introduction of this function, it is possible that for certain
monitor and window configurations, creating an SDL window will cause a
native crash.
```
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000050
Exception Codes: 0x0000000000000001, 0x0000000000000050
Exception Note: EXC_CORPSE_NOTIFY
Termination Reason: Namespace SIGNAL, Code 11 Segmentation fault: 11
Terminating Process: exc handler [56627]
VM Region Info: 0x50 is not in any region. Bytes before following region: 140737486737328
REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL
UNUSED SPACE AT START
--->
VM_ALLOCATE 7fffffe75000-7fffffe76000 [ 4K] r-x/r-x SM=ALI
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libSDL2.dylib 0x10247f665 SDL_UpdateFullscreenMode + 357
1 libSDL2.dylib 0x10247ec70 SDL_CreateWindow_REAL + 1504
2 ??? 0x111262de8 ???
3 ??? 0x110c39fff ???
4 libcoreclr.dylib 0x101fdf2a9 CallDescrWorkerInternal + 124
```
Tracking thread from our end: https://github.com/ppy/osu-framework/issues/5190
Regressed with: https://github.com/libsdl-org/SDL/pull/5573
In testing, the window would not find a valid screen if created
"hanging" off a primary display with a secondary display below it. In
checking why this was the case, the `display_centre` was being
calculated with a negative y origin, causing a final negative value
falling outside all display bounds:
```
SDL error log [debug]: display_centre.y = -1296 + 1296 / 2
SDL error log [debug]: Display rect 0: 0 0 2560 1440
SDL error log [debug]: Display rect 1: 2560 -625 1080 2560
SDL error log [debug]: Display rect 2: 0 1440 1728 1296
```
The method that was being used to find the current window using the frame
origin/size seems unreliable, so I have opted to replace it with with a
tried method (https://stackoverflow.com/a/40891902).
Initial testing shows that this works with non-standard DPI screens, but
further testing would be appreciated (cc @sezero / @misl6 from the
original PR thread).
|
|
041666e6
|
2022-07-24T05:45:59
|
|
video: wayland: Don't switch to libdecor path for borderless windows
We actually request CSD mode with xdg-decoration for borderless
windows, so we get what we wanted there and there's no point in going
into fallback paths.
|
|
405d1f65
|
2022-07-24T10:16:20
|
|
video: wayland: Roundtrip after falling back to libdecor in xdg-decoration handler
Otherwise libdecor doesn't have a chance to acquire xdg-toplevel after
libdecor_new before we attempt to use it in Wayland_ShowWindow.
Fixes #5952
|
|
78bad667
|
2022-07-16T22:12:08
|
|
video: wayland: Resize the window before sending the SDL_RESIZE event
Currently, the SDL_WINDOWEVENT_RESIZED event is sent before the actual
window is resized (and various internal state, such as the desired
GL/Vulkan backbuffer size, are updated). This makes sense, as SDL will
discard a no-op resize, which would be the case if we had resized before
sending the event (indeed, there are existing hacks to prevent this).
However, this means that SDL_{GL,Vulkan}_GetDrawableSize() will still
use the old size in the SDL_WINDOWEVENT_RESIZED handler. In the case of
SDL_Renderer, this means the drawable size it uses will be wrong, and
the viewport will get "updated" to the old value.
This then results in bug #5899.
|
|
cef1514b
|
2022-07-17T09:07:04
|
|
Fixed some Xcode warnings
|
|
2f216485
|
2022-07-08T20:56:40
|
|
SDL_os2video.c: silenced -Wempty-body warning, along with minor tidy-up.
|
|
c0eada20
|
2022-07-06T17:00:16
|
|
Fix assumption that DRI_DEVNAME begins at 0 (#5865)
* Fix assumption that DRI_DEVNAME begins at 0
The existing logic of the code was to count every possible entry in
KMSDRM_DRI_PATH. After this a for loop would start trying to open
filename0, filename1, filename2, etc. In recent Linux kernels (say
5.18) with simpledrm, the lowest KMSDRM_DRI_DEVNAME is often
/dev/dri/card1, rather than /dev/dri/card0, causing the code to fail
once /dev/dri/card0 has failed to open. Running:
modprobe foodrm && modprobe bardrm && rmmod foodrm
before you try to run an application with SDL KMSDRM would have also
made this fail.
* Various changes from review
- Removed newline and period from SDL error
- Explicitely compare memcmp to zero (also changed to SDL_memcmp)
- Changed memcpy to strncpy
- Less aggressive line wrapping
* Various changes from review
- strncpy to SDL_strlcpy
- removed size hardcodings for KMSDRM_DRI_PATHSIZE and
KMSDRM_DRI_DEVNAMESIZE
- made all KMSDRM_DRI defines, run-time variables to reduce bugs caused
by these defines being more build-time on Linux and more run-rime on
OpenBSD
- renamed openbsd69orgreater variable to moderndri
- altered comment from "if on OpenBSD" to add difference in 6.9
* Various changes from review
- Use max size of destination, rather than max size of source
- Less hardcodings
|
|
adf3ce7c
|
2022-07-05T21:42:24
|
|
Don't drop mouse focus on WM_MOUSELEAVE if the mouse is in relative mode; mouse-level is not meaningful for that case.
Do drop mouse focus when keyboard focus is lost if the mouse is in relative mode.
|
|
0253a450
|
2022-07-05T21:42:20
|
|
Fix format specifiers for WPARAM/LPARAM values, they are UINT_PTR.
|
|
fdb86b82
|
2022-07-04T12:48:32
|
|
x11: Don't try to use XInput2 multitouch if not supported.
Fixes #5889.
|
|
b085c182
|
2022-07-04T16:38:05
|
|
make SDL_SetTextInputRect take a pointer to const
The documentation doesn't state that the argument is ever modified,
and no implementation does so currently.
This is a non-breaking change to guarantee as much to callers.
|
|
85bbf8ee
|
2022-07-03T12:19:33
|
|
Fixed coment after #endif
|
|
f317d619
|
2022-07-01T13:59:14
|
|
Xbox GDKX support (#5869)
* Xbox GDK support (14 squashed commits)
* Added basic keyboard testing
* Update readme
* Code review fixes
* Fixed issue where controller add/removal wasn't working (since the device notification events don't work on Xbox, have to use the joystick thread to poll XInput)
|
|
78089e65
|
2022-07-01T13:08:31
|
|
Remove unused internal header SDL_sysevents.h
|
|
0ad65277
|
2022-06-29T17:26:09
|
|
Refactored code to send scancodes for an ASCII on-screen keyboard key
|
|
6c536afd
|
2022-06-27T15:43:17
|
|
Fix C89 declaration for macOS modules.
Since Clang 14, `-Wdeclaration-after-statement` is enforced on every
standard.
|
|
3b191580
|
2022-06-27T17:19:39
|
|
Windows GDK Support (#5830)
* Added GDK
* Simplfied checks in SDL_config_wingdk.h
* Added testgdk sample
* Added GDK readme
* Fixed error in merge of SDL_windows.h
* Additional GDK fixes
* OpenWatcom should not export _SDL_GDKGetTaskQueue
* Formatting fixes
* Moved initialization code into SDL_GDKRunApp
|
|
51c6488f
|
2022-06-26T18:47:34
|
|
Add support for SDL_render_d3d12.c to compile in C++ mode
|
|
7adb08a7
|
2022-06-22T01:37:00
|
|
fixed SDL_BlitMap typedef redefinition errors
|
|
12b371ee
|
2022-06-21T14:49:00
|
|
x11: Don't send diplay-add events for displays connected at init time.
Reference Issue #4977.
|
|
c11bdeeb
|
2022-06-21T13:28:14
|
|
wayland: Round fractional backbuffer sizes halfway away from zero
Use SDL_lroundf() to round fractional backbuffer sizes halfway away from zero, as this is the rounding method recommended by the forthcoming Wayland fractional scaling protocol.
|
|
9914e87f
|
2022-06-20T12:53:10
|
|
Also send DPI change when expected resize.
|
|
af733c7a
|
2022-06-20T02:26:40
|
|
Fix DPI-raised SDL_WINDOWEVENT_SIZE_CHANGED with event callback.
Move the sending of this event down so stuff like calling SDL_GL_GetDrawableSize() from a callback reports the new size instead of the old one.
|
|
a8d41b3b
|
2022-06-18T21:51:32
|
|
check for shellscalingapi.h presence instead of WINVER >= 0x0603
|
|
5f6d0abe
|
2022-06-18T12:57:27
|
|
SDL_SendEditingText() has int parameters, so use that type for parameter calculation
We might want to use ssize_t as @Guldoman suggested, but that's a larger internal API change, and still requires casting of the SDL_utf8strnlen() result.
Fixes https://github.com/libsdl-org/SDL/pull/5821
|
|
adc68758
|
2022-06-17T10:22:28
|
|
Added SDL_copyp to avoid size mismatch when copying values (thanks @1bsyl!)
Closes https://github.com/libsdl-org/SDL/pull/5811
|
|
a5949d7b
|
2022-06-15T23:00:28
|
|
Fixed crash on Windows
These functions really are WINAPI
|
|
f8ae3ef1
|
2022-06-15T22:01:59
|
|
wayland: use libdecor resize edge enums for libdecor
|
|
e427e80b
|
2022-06-14T10:41:18
|
|
wayland: Use the output descriptions from xdg-output when available
Some compositors will provide 'nicer' / 'human readable' output descriptions via the xdg-output protocol. Use these description strings, when available, instead of the model name provided by wl-output. On compositors such as GNOME where this is provided, the display names provided to applications by SDL will now match those in the desktop display settings panel. On compositors where this data isn't provided, the old behavior of using the model string provided by wl-output will remain unchanged.
Additionally, per the protocol spec, output data provided by xdg-output should supersede wl-output data, so this is the recommended behavior in general.
|
|
714502d3
|
2022-06-13T22:15:56
|
|
minor windows warning fixes.
|
|
507ce36d
|
2022-05-10T10:35:06
|
|
video: Note unused SDL_surface creation parameters for removal in SDL 3
Signed-off-by: Simon McVittie <smcv@collabora.com>
|
|
535fdc3a
|
2022-05-10T10:34:41
|
|
video: Detect and reject nonsense SDL_surface dimensions
Signed-off-by: Simon McVittie <smcv@collabora.com>
|
|
8c9f7104
|
2022-05-10T10:33:54
|
|
video: Harden calculation of SDL_surface pitch and size against overflow
If the width is sufficiently ludicrous, then the calculated pitch or
the image size could conceivably be a signed integer overflow, which
is undefined behaviour. Calculate in the unsigned size_t domain, with
overflow checks.
Signed-off-by: Simon McVittie <smcv@collabora.com>
|
|
63b3b9a5
|
2022-06-13T16:02:40
|
|
Fix some typos in diagnostic messages
Detected by Debian's packaging QA tool, Lintian.
Signed-off-by: Simon McVittie <smcv@collabora.com>
|
|
9a036767
|
2022-06-12T15:28:49
|
|
windows: Get better name for the physical display, for Vista and later.
Fixes #5321.
|
|
fd8cafc7
|
2022-06-11T17:11:55
|
|
Rename variables in SDL_egl.c to be more intuitive
|
|
ab81a559
|
2022-06-07T02:01:27
|
|
Windows DPI scaling/highdpi support
Adds hint "SDL_WINDOWS_DPI_SCALING" which can be set to "1" to
change the SDL coordinate system units to be DPI-scaled points, rather
than pixels everywhere.
This means windows will be appropriately sized, even when created on
high-DPI displays with scaling.
e.g. requesting a 640x480 window from SDL, on a display with 125%
scaling in Windows display settings, will create a window with an
800x600 client area (in pixels).
Setting this to "1" implicitly requests process DPI awareness
(setting SDL_WINDOWS_DPI_AWARENESS is unnecessary),
and forces SDL_WINDOW_ALLOW_HIGHDPI on all windows.
|
|
448e05e3
|
2022-06-05T12:51:57
|
|
add DPI_AWARENESS_CONTEXT_UNAWARE_GDISCALED define
|
|
1b797957
|
2022-06-05T12:36:58
|
|
SDL_windowsvideo.c: add HIGHDPI_DEBUG ifdef, print DPI awareness at startup if defined
document some additional quirks
|
|
1488c408
|
2022-06-05T12:01:32
|
|
WM_DPICHANGED: remove some dead code, add comment
|
|
60ef11b3
|
2022-06-03T00:21:36
|
|
Fix Watcom compile errors
|
|
d3b970d4
|
2022-05-29T21:56:37
|
|
HighDPI: remove SWP_NOSIZE in WIN_SetWindowPosition
If the move results in a DPI change, we need to allow the window to resize (e.g. AdjustWindowRectExForDpi frame sizes are different).
- WM_DPICHANGED: Don't assume WM_GETDPISCALEDSIZE is always called for PMv2 awareness - it's only called during interactive dragging.
- WIN_AdjustWindowRectWithStyle: always calculate final window size including frame based on the destination rect,
not based on the current window DPI.
- Update wmmsg.h to include WM_GETDPISCALEDSIZE (for WMMSG_DEBUG)
- WIN_AdjustWindowRectWithStyle: add optional logging
- WM_GETMINMAXINFO: add optional HIGHDPI_DEBUG logging
- WM_DPICHANGED: fix potentially clobbering data->expected_resize
Together these changes fix the following scenario:
- launch testwm2 with the SDL_WINDOWS_DPI_AWARENESS=permonitorv2 environment variable
- Windows 10 21H2 (OS Build 19044.1706)
- Left (primary) monitor: 3840x2160, 125% scaling
- Right (secondary) monitor: 2560x1440, 100% scaling
- Alt+Enter, Alt+Enter (to enter + leave desktop fullscreen), Alt+Right (to move window to right monitor). Ensure the window client area stays 640x480. Drag the window back to the 125% monitor, ensure client area stays 640x480.
|
|
51ebefee
|
2022-02-28T00:43:43
|
|
Support PMv2 DPI awareness, add SDL_HINT_WINDOWS_DPI_AWARENESS
The hint allows setting a specific DPI awareness ("unaware", "system", "permonitor", "permonitorv2").
This is the first part of High-DPI support on Windows ( https://github.com/libsdl-org/SDL/issues/2119 ).
It doesn't implement a virtualized SDL coordinate system, which will be
addressed in a later commit. (This hint could be useful for SDL apps
that want 1 SDL unit = 1 pixel, though.)
Detecting and behaving correctly under per-monitor V2
(calling AdjustWindowRectExForDpi where needed) should fix the
following issues:
https://github.com/libsdl-org/SDL/issues/3286
https://github.com/libsdl-org/SDL/issues/4712
|