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:
Frank Praznik
2024-05-13 12:59:37 -04:00
parent c7087fea01
commit df3fea87d6
9 changed files with 62 additions and 50 deletions

View File

@@ -93,6 +93,8 @@ struct SDL_VideoData
int relative_mouse_mode;
SDL_bool display_externally_owned;
SDL_bool scale_to_display_enabled;
};
struct SDL_DisplayData