wayland: truncate scaled width and height on configure
When a configure event is emitted, the updated graphical dimensions are sent unscaled. Currently, the application applies fractional scaling to the dimensions by truncating the scale to an integer. This is incorrect, as scales could be fractional and the compositor would expect the fractional scale to be applied to the width and height. Truncate the width and height after scaling instead of truncating the scale to reduce the right and bottom seams to 0-1 pixels.
This commit is contained in:
parent
e17e4f31f5
commit
0ebf6a8d5b
1 changed files with 2 additions and 2 deletions
|
|
@ -412,8 +412,8 @@ impl Dispatch<zwlr_layer_surface_v1::ZwlrLayerSurfaceV1, ()> for Dispatcher {
|
|||
let layout = ctx.seat.layout();
|
||||
let mod_state = ctx.seat.mod_state();
|
||||
|
||||
let scale = gfx.display().scale() / 120;
|
||||
let (width, height) = (width * scale, height * scale);
|
||||
let scale = gfx.display().scale();
|
||||
let (width, height) = (width * scale / 120, height * scale / 120);
|
||||
gfx.resize(layout, mod_state, width, height);
|
||||
|
||||
let disp = gfx.display();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue