aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2021-03-24 19:52:58 +0000
committerDaniel Eklöf <daniel@ekloef.se>2021-03-25 08:39:50 +0000
commit1a0f13640e6f007cd08220dc54fed8b6dd8eec3c (patch)
tree35cecc47bb80b8c6c1d1c7f04f14f2c9c546b904 /scripts
parentrender: render_osd(): no need to pass width/height as parameters (diff)
render: make sure surface buffer sizes are a multiple of the scaling factor
The buffer attached to a surface with wl_surface_attach() must have a width and height that both are a multiple of the scale configured for that buffer: The new size of the surface is calculated based on the buffer size transformed by the inverse buffer_transform and the inverse buffer_scale. This means that at commit time the supplied buffer size must be an integer multiple of the buffer_scale. If that's not the case, an invalid_size error is sent. Due to a libwayland bug[^1], this is currently *not* being reported as an error. However, recent versions of Sway have started enforcing this, and is e.g. dropping (not rendering) sub-surfaces that does not adhere to this. [^1]: https://gitlab.freedesktop.org/wayland/wayland/-/issues/194 Closes #409
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions