From 3213ef6493732e46f8f5d195efbb832a772a29a7 Mon Sep 17 00:00:00 2001 From: hujianwei Date: Tue, 22 Nov 2022 12:50:42 +0000 Subject: [PATCH] Fix scaling of built in resize dimensions * xdg_toplevel.c (PostResize): Scale specified dimensions to the surface coordinate system. --- xdg_toplevel.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/xdg_toplevel.c b/xdg_toplevel.c index 5a9186e..295198e 100644 --- a/xdg_toplevel.c +++ b/xdg_toplevel.c @@ -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); }