Commit ab64fa7
committed
wayland: set geometry directly to output resolution for fullscreen
Unfortunately due to the way fractional scaling on wayland works, it
can lead to rounding errors when calculating the physical size of the
buffer. It's convoluted but essentially the compositor will communicate
the logical size back to us. Depending on the fractional scale factor,
the communicated size can be truncated in a significant enough way that
causes final calculated size to be off by a maximum of two (truncation
at both steps).
In general, there's nothing we can really do about this but for
specifically fullscreen there's an easy enough workaround. Just set the
size to be the same as the output. Since we might not have rendered the
surface yet (and thus not have an easily accessible wl->current_output),
it's easier to just loop through the output list until we have a match.
Fixes #17415.1 parent 102e693 commit ab64fa7
1 file changed
Lines changed: 23 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
310 | 310 | | |
311 | 311 | | |
312 | 312 | | |
| 313 | + | |
313 | 314 | | |
314 | 315 | | |
315 | 316 | | |
| |||
1921 | 1922 | | |
1922 | 1923 | | |
1923 | 1924 | | |
| 1925 | + | |
| 1926 | + | |
1924 | 1927 | | |
1925 | 1928 | | |
1926 | 1929 | | |
| |||
3128 | 3131 | | |
3129 | 3132 | | |
3130 | 3133 | | |
| 3134 | + | |
| 3135 | + | |
| 3136 | + | |
| 3137 | + | |
| 3138 | + | |
| 3139 | + | |
| 3140 | + | |
| 3141 | + | |
| 3142 | + | |
| 3143 | + | |
| 3144 | + | |
| 3145 | + | |
| 3146 | + | |
| 3147 | + | |
| 3148 | + | |
| 3149 | + | |
| 3150 | + | |
| 3151 | + | |
| 3152 | + | |
| 3153 | + | |
3131 | 3154 | | |
3132 | 3155 | | |
3133 | 3156 | | |
| |||
0 commit comments