wayland: fix crash when desktop scaling is enabled
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Single-pixel buffers must be scaled with a viewport. Before this patch, we didn't do that, unless we've seen fractional scaling being enabled by the compositor. We typically don't see this for the first frame, since compositor usually sends the fractional scaling factor *after* the window has been mapped. Despite this, it worked as long as there were no scaling enabled at all. With scaling enabled, we got: wl_surface#3: error 2: Buffer size (1x1) is not divisible by scale (2) warn: wayland.c:2634: disconnected from Wayland err: wayland.c:3093: failed to flush wayland socket: Protocol error (71) Fix by forcing the use of a viewport when committing single-pixel buffers.
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
1 file+4 added−4 removed
- other:+4 added−4 removed