Commit 3f84db6
committed
wayland: Handle min/max sizes in fixed-size windows with viewports
Wayland is sometimes at-odds with clients that want to enforce an aspect ratio or min/max window size, as certain window states have dimensions that either must be obeyed (maximized), or will give terrible results if they aren't (tiled). Use viewports and/or a masking subsurface to handle cases where surfaces are unable to match the exact window size.
The masking system also allows for switching the emulated fullscreen modes to aspect-correct by default, as it will handle masking non-native aspect ratios on compositors that don't automatically mask around fullscreen windows.1 parent 005cb20 commit 3f84db6
File tree
8 files changed
+568
-226
lines changed- include/SDL3
- src/video/wayland
- wayland-protocols
8 files changed
+568
-226
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3805 | 3805 | | |
3806 | 3806 | | |
3807 | 3807 | | |
3808 | | - | |
| 3808 | + | |
3809 | 3809 | | |
3810 | 3810 | | |
3811 | 3811 | | |
| |||
3815 | 3815 | | |
3816 | 3816 | | |
3817 | 3817 | | |
3818 | | - | |
| 3818 | + | |
3819 | 3819 | | |
3820 | | - | |
3821 | 3820 | | |
3822 | 3821 | | |
3823 | 3822 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
| |||
186 | 187 | | |
187 | 188 | | |
188 | 189 | | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
189 | 214 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
| 34 | + | |
33 | 35 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| 71 | + | |
71 | 72 | | |
72 | 73 | | |
73 | 74 | | |
| |||
651 | 652 | | |
652 | 653 | | |
653 | 654 | | |
| 655 | + | |
654 | 656 | | |
655 | 657 | | |
656 | 658 | | |
| |||
1272 | 1274 | | |
1273 | 1275 | | |
1274 | 1276 | | |
| 1277 | + | |
| 1278 | + | |
1275 | 1279 | | |
1276 | 1280 | | |
1277 | 1281 | | |
| |||
1337 | 1341 | | |
1338 | 1342 | | |
1339 | 1343 | | |
| 1344 | + | |
| 1345 | + | |
1340 | 1346 | | |
1341 | 1347 | | |
1342 | 1348 | | |
| |||
1665 | 1671 | | |
1666 | 1672 | | |
1667 | 1673 | | |
| 1674 | + | |
| 1675 | + | |
| 1676 | + | |
| 1677 | + | |
| 1678 | + | |
1668 | 1679 | | |
1669 | 1680 | | |
1670 | 1681 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| 64 | + | |
64 | 65 | | |
65 | 66 | | |
66 | 67 | | |
| |||
85 | 86 | | |
86 | 87 | | |
87 | 88 | | |
| 89 | + | |
88 | 90 | | |
89 | 91 | | |
90 | 92 | | |
| |||
0 commit comments