From dcb29efce58ce0e122806b7f352a9f682e2fcbd8 Mon Sep 17 00:00:00 2001 From: Ivan Molodetskikh Date: Fri, 6 Sep 2024 15:10:01 +0300 Subject: 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. --- src/niri.rs | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'src/niri.rs') 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 { -- cgit