Commit 7f402c1c authored by Florian Müllner's avatar Florian Müllner Committed by Georges Basile Stavracas Neto

workspace: Cap scaled floating size to target layout size

A window preview's floating geometry is scaled down according to the
workspace's allocation, while the layout geometry is computed directly
for the available space.

For previews that maintain their real size in the layout geometry,
that scaling leads to a distracting size bounce when transitioning
between both layouts.

Address that by not allowing the scaled floating size to drop below
that layout size (which is at most equal to the unscaled floating size).

parent 497f1017
Pipeline #210838 passed with stages
in 4 minutes and 32 seconds
......@@ -614,6 +614,11 @@ var WorkspaceLayout = GObject.registerClass({
// don't allow the scaled floating size to drop below
// the target layout size
Math.max(workspaceBox.get_width(), width),
Math.max(workspaceBox.get_height(), height));
layoutBox.x1 = x;
layoutBox.x2 = layoutBox.x1 + width;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment