mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-05-16 17:58:27 +00:00
wayland: Rework scale-to-display
This extends the display scaling mode to be global and work in terms of pixels everywhere, with the content scale value set on displays. The per-window property had some issues, and has been removed in favor of retaining only the global hint that changes all coordinates to pixel values, sets the content scale on the displays, and generally makes the Wayland backend behave similarly to Win32 or X11. Some additional work was needed to fix cases where displays can appear to overlap, since Wayland desktops are always described in logical coordinates, and attempting to adjust the display positions so that they don't overlap can get very ugly in all but the simplest cases, as large gaps between displays can result.
This commit is contained in:
parent
c7087fea01
commit
df3fea87d6
9 changed files with 62 additions and 50 deletions
|
@ -3093,6 +3093,7 @@ extern "C" {
|
|||
|
||||
/**
|
||||
* A variable forcing non-DPI-aware Wayland windows to output at 1:1 scaling.
|
||||
* This must be set before initializing the video subsystem.
|
||||
*
|
||||
* When this hint is set, Wayland windows that are not flagged as being
|
||||
* DPI-aware will be output with scaling designed to force 1:1 pixel mapping.
|
||||
|
@ -3102,12 +3103,12 @@ extern "C" {
|
|||
* configurations, as this forces the window to behave in a way that Wayland
|
||||
* desktops were not designed to accommodate:
|
||||
*
|
||||
* - Rounding errors can result with odd window sizes and/or desktop scales.
|
||||
* - The window may be unusably small.
|
||||
* - The window may jump in size at times.
|
||||
* - The window may appear to be larger than the desktop size to the
|
||||
* application.
|
||||
* - Possible loss of cursor precision.
|
||||
* - Rounding errors can result with odd window sizes and/or desktop scales,
|
||||
* which can cause the window contents to appear slightly blurry.
|
||||
* - The window may be unusably small on scaled desktops.
|
||||
* - The window may jump in size when moving between displays of different scale factors.
|
||||
* - Displays may appear to overlap when using a multi-monitor setup with scaling enabled.
|
||||
* - Possible loss of cursor precision due to the logical size of the window being reduced.
|
||||
*
|
||||
* New applications should be designed with proper DPI awareness handling
|
||||
* instead of enabling this.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue