Skip to content

Commit

Permalink
Start layout transaction in set_location
Browse files Browse the repository at this point in the history
Prevents windows from being in the wrong spot if it's location was set relative to another output and that output's scale changes
  • Loading branch information
Ottatop committed Jul 3, 2024
1 parent e161784 commit f3d0653
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1121,6 +1121,9 @@ impl output_service_server::OutputService for OutputService {
if let Some(y) = y {
loc.y = y;
}

state.capture_snapshots_on_output(&output, []);

state.pinnacle.change_output_state(
&mut state.backend,
&output,
Expand All @@ -1130,6 +1133,7 @@ impl output_service_server::OutputService for OutputService {
Some(loc),
);
debug!("Mapping output {} to {loc:?}", output.name());
state.pinnacle.begin_layout_transaction(&output);
state.pinnacle.request_layout(&output);
state
.pinnacle
Expand Down

0 comments on commit f3d0653

Please sign in to comment.