diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2024-09-06 15:10:01 +0300 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2024-09-06 18:32:41 +0300 |
| commit | dcb29efce58ce0e122806b7f352a9f682e2fcbd8 (patch) | |
| tree | 8b002d6e1ca6df7cd481ca4740829b33e9fd693d /src/niri.rs | |
| parent | cb5d97f600c7dc5bb31525c5cd664c1377145d87 (diff) | |
| download | niri-dcb29efce58ce0e122806b7f352a9f682e2fcbd8.tar.gz niri-dcb29efce58ce0e122806b7f352a9f682e2fcbd8.tar.bz2 niri-dcb29efce58ce0e122806b7f352a9f682e2fcbd8.zip | |
Implement by-id window addressing in IPC and CLI, fix move-column-to-workspace
This is a JSON-breaking change for the IPC actions that changed from
unit variants to struct variants. Unfortunately, I couldn't find a way
with serde to both preserve a single variant, and make it serialize to
the old value when the new field is None. I don't think anyone is using
these actions from JSON at the moment, so this breaking change is fine.
Diffstat (limited to 'src/niri.rs')
| -rw-r--r-- | src/niri.rs | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/niri.rs b/src/niri.rs index f7963742..a5cedef4 100644 --- a/src/niri.rs +++ b/src/niri.rs @@ -2447,15 +2447,8 @@ impl Niri { } }; - // FIXME: when we do fixes for no connected outputs, this will need fixing too. - let active_workspace = self.layout.active_workspace()?; - - if target_workspace.current_output() == active_workspace.current_output() { - return Some((None, target_workspace_index)); - } - let target_output = target_workspace.current_output()?; - - Some((Some(target_output.clone()), target_workspace_index)) + let target_output = target_workspace.current_output(); + Some((target_output.cloned(), target_workspace_index)) } pub fn output_down(&self) -> Option<Output> { |
