Fix scaling of built in resize dimensions

* xdg_toplevel.c (PostResize): Scale specified dimensions to the
surface coordinate system.
This commit is contained in:
hujianwei 2022-11-22 12:50:42 +00:00
parent 8672edcb43
commit 3213ef6493

View file

@ -1749,6 +1749,14 @@ PostResize (Role *role, XdgRoleImplementation *impl, int west_motion,
XdgToplevel *toplevel;
toplevel = ToplevelFromRoleImpl (impl);
/* Scale the provided window coordinates to surface coordinates. */
if (toplevel->role->surface)
TruncateScaleToSurface (toplevel->role->surface,
new_width, new_height,
&new_width, &new_height);
PostResize1 (toplevel, west_motion, north_motion,
new_width, new_height);
}