Skip to content

Commit

Permalink
shell: Fix dragging maximized windows on non-origin outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
Drakulix committed Oct 25, 2023
1 parent 33ee25c commit 1d799f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/shell/workspace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,7 @@ impl Workspace {
if mapped.maximized_state.lock().unwrap().is_some() {
// If surface is maximized then unmaximize it
let new_size = self.unmaximize_request(window);
let ratio = pos.x / output.geometry().size.w as f64;
let ratio = pos.to_local(&self.output).x / output.geometry().size.w as f64;

initial_window_location = new_size
.map(|size| (pos.x - (size.w as f64 * ratio), pos.y).into())
Expand Down

0 comments on commit 1d799f4

Please sign in to comment.