Focus output unconditionally after moving window there
Browse files at this commit924e21f69b4f0a59e83637f2ba04ba1ef2360bebParent: befdebf1 changed file +8 -0
- src/input.rs +8 -0
src/input.rsmodified+8 -0
| @@ -587,48 +587,56 @@ impl State { | |||
| 587 | Action::MoveWindowToMonitorLeft => { | 587 | Action::MoveWindowToMonitorLeft => { |
| 588 | if let Some(output) = self.niri.output_left() { | 588 | if let Some(output) = self.niri.output_left() { |
| 589 | self.niri.layout.move_to_output(&output); | 589 | self.niri.layout.move_to_output(&output); |
| 590 | + self.niri.layout.focus_output(&output); | ||
| 590 | self.move_cursor_to_output(&output); | 591 | self.move_cursor_to_output(&output); |
| 591 | } | 592 | } |
| 592 | } | 593 | } |
| 593 | Action::MoveWindowToMonitorRight => { | 594 | Action::MoveWindowToMonitorRight => { |
| 594 | if let Some(output) = self.niri.output_right() { | 595 | if let Some(output) = self.niri.output_right() { |
| 595 | self.niri.layout.move_to_output(&output); | 596 | self.niri.layout.move_to_output(&output); |
| 597 | + self.niri.layout.focus_output(&output); | ||
| 596 | self.move_cursor_to_output(&output); | 598 | self.move_cursor_to_output(&output); |
| 597 | } | 599 | } |
| 598 | } | 600 | } |
| 599 | Action::MoveWindowToMonitorDown => { | 601 | Action::MoveWindowToMonitorDown => { |
| 600 | if let Some(output) = self.niri.output_down() { | 602 | if let Some(output) = self.niri.output_down() { |
| 601 | self.niri.layout.move_to_output(&output); | 603 | self.niri.layout.move_to_output(&output); |
| 604 | + self.niri.layout.focus_output(&output); | ||
| 602 | self.move_cursor_to_output(&output); | 605 | self.move_cursor_to_output(&output); |
| 603 | } | 606 | } |
| 604 | } | 607 | } |
| 605 | Action::MoveWindowToMonitorUp => { | 608 | Action::MoveWindowToMonitorUp => { |
| 606 | if let Some(output) = self.niri.output_up() { | 609 | if let Some(output) = self.niri.output_up() { |
| 607 | self.niri.layout.move_to_output(&output); | 610 | self.niri.layout.move_to_output(&output); |
| 611 | + self.niri.layout.focus_output(&output); | ||
| 608 | self.move_cursor_to_output(&output); | 612 | self.move_cursor_to_output(&output); |
| 609 | } | 613 | } |
| 610 | } | 614 | } |
| 611 | Action::MoveColumnToMonitorLeft => { | 615 | Action::MoveColumnToMonitorLeft => { |
| 612 | if let Some(output) = self.niri.output_left() { | 616 | if let Some(output) = self.niri.output_left() { |
| 613 | self.niri.layout.move_column_to_output(&output); | 617 | self.niri.layout.move_column_to_output(&output); |
| 618 | + self.niri.layout.focus_output(&output); | ||
| 614 | self.move_cursor_to_output(&output); | 619 | self.move_cursor_to_output(&output); |
| 615 | } | 620 | } |
| 616 | } | 621 | } |
| 617 | Action::MoveColumnToMonitorRight => { | 622 | Action::MoveColumnToMonitorRight => { |
| 618 | if let Some(output) = self.niri.output_right() { | 623 | if let Some(output) = self.niri.output_right() { |
| 619 | self.niri.layout.move_column_to_output(&output); | 624 | self.niri.layout.move_column_to_output(&output); |
| 625 | + self.niri.layout.focus_output(&output); | ||
| 620 | self.move_cursor_to_output(&output); | 626 | self.move_cursor_to_output(&output); |
| 621 | } | 627 | } |
| 622 | } | 628 | } |
| 623 | Action::MoveColumnToMonitorDown => { | 629 | Action::MoveColumnToMonitorDown => { |
| 624 | if let Some(output) = self.niri.output_down() { | 630 | if let Some(output) = self.niri.output_down() { |
| 625 | self.niri.layout.move_column_to_output(&output); | 631 | self.niri.layout.move_column_to_output(&output); |
| 632 | + self.niri.layout.focus_output(&output); | ||
| 626 | self.move_cursor_to_output(&output); | 633 | self.move_cursor_to_output(&output); |
| 627 | } | 634 | } |
| 628 | } | 635 | } |
| 629 | Action::MoveColumnToMonitorUp => { | 636 | Action::MoveColumnToMonitorUp => { |
| 630 | if let Some(output) = self.niri.output_up() { | 637 | if let Some(output) = self.niri.output_up() { |
| 631 | self.niri.layout.move_column_to_output(&output); | 638 | self.niri.layout.move_column_to_output(&output); |
| 639 | + self.niri.layout.focus_output(&output); | ||
| 632 | self.move_cursor_to_output(&output); | 640 | self.move_cursor_to_output(&output); |
| 633 | } | 641 | } |
| 634 | } | 642 | } |