Skip to content

Commit

Permalink
fix: #317 match window position shrinking when manipulating clients w…
Browse files Browse the repository at this point in the history
…ith the mouse
  • Loading branch information
sminez committed Oct 28, 2024
1 parent df9a77a commit d4084a6
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/builtin/actions/floating.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,14 @@ impl ClickData {
(f)(&mut r, dx, dy);

state.client_set.float(id, r)?;
x.position_client(id, r)?;

// When we position the window we need to shrink in so that we match
// the behaviour of ../../x/mod.rs:/fn\sposition_clients/
// -> without this we end up with the window size shrinking when the
// mouse button is released and the default position_clients logic
// runs using the Rect that we store above.
let border = state.config.border_width;
x.position_client(id, r.shrink_in(border))?;

Ok(())
}
Expand Down

0 comments on commit d4084a6

Please sign in to comment.