Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[i3] focus events cause workspace switch on every rename #42

@azuline

Description

@azuline

When I am moving a container between workspaces, sometimes the active workspace also switches to the destination workspace. This only happens when i have i3wsr enabled; it does not happen when I have i3wsr disabled.

To give a more concrete example:

  1. I have kitty in Workspace 1. My active workspace is Workspace 1
  2. I press $mod+shift+3 to move kitty to Workspace 3.
  3. kitty moves to Workspace 3. My active workspace also becomes Workspace 3. Now I am on Workspace 3 with kitty focused.

Expected behavior

  1. I have kitty in Workspace 1. My active workspace is Workspace 1
  2. I press $mod+shift+3 to move kitty to Workspace 3.
  3. kitty moves to Workspace 3. My active workspace remains Workspace 1.

Interesting Observations

  • This bug occurs when I move a container to an empty workspace as well as a populated workspace. It does not matter if the workspace is new or not.
  • However, this bug only occurs when moving a container to a higher number workspace. Moving a window from W1 -> W3 triggers this bug. Moving a window from W3 -> W1 does not trigger this bug.

Debugging

When I have remove_duplicates set and I move a window that does not cause a rename (old == &new), this bug does not occur. So the bug seems to be that focus == true in update_tree when it should not be, triggering this code block:

            // Focus on flag, fix for moving floating windows across multiple monitors
            if focus {
                let focus_cmd = format!("workspace \"{}\"", old);
                conn.run_command(&focus_cmd)?;
            }

Here are some logs from a simple reproduction:

~
blissful@haiqin > i3wsr --verbose
[COMMAND] rename workspace "1 firefox | kitty" to "1 kitty | firefox"
[INFO] Workspace on output: HDMI-1
Started successfully. Listening for events...
[WINDOW EVENT] Change: Title, Container: Node { id: 272455520, name: Some("i3wsr --verbose ~"), node_type: Con, border: Pixel, current_border_width: 6, layout: SplitH, percent: Some(0.5), rect: Rect { x: 19, y: 1063, width: 1330, height: 1030 }, window_rect: Rect { x: 6, y: 6, width: 1318, height: 1018 }, deco_rect: Rect { x: 0, y: 0, width: 0, height: 0 }, geometry: Rect { x: 0, y: 0, width: 1920, height: 1080 }, urgent: false, focused: true, focus: [], floating: Some(AutoOff), nodes: [], floating_nodes: [], sticky: false, representation: None, fullscreen_mode: Some(0), scratchpad_state: Some(None), app_id: None, pid: None, window: Some(16777230), num: None, window_properties: Some(WindowProperties { title: Some("i3wsr --verbose ~"), instance: Some("kitty"), class: Some("kitty"), window_role: None, window_type: None, transient_for: None }), marks: [], inhibit_idle: None, idle_inhibitors: None, shell: None, visible: None, output: Some("HDMI-1") }
[WINDOW EVENT] Change: Focus, Container: Node { id: 272948656, name: Some("vim src/* ~/s/i3wsr"), node_type: Con, border: Pixel, current_border_width: 6, layout: SplitH, percent: Some(0.5), rect: Rect { x: 19, y: 19, width: 1330, height: 1030 }, window_rect: Rect { x: 6, y: 6, width: 1318, height: 1018 }, deco_rect: Rect { x: 0, y: 0, width: 0, height: 0 }, geometry: Rect { x: 0, y: 0, width: 1920, height: 1080 }, urgent: false, focused: true, focus: [], floating: Some(AutoOff), nodes: [], floating_nodes: [], sticky: false, representation: None, fullscreen_mode: Some(0), scratchpad_state: Some(None), app_id: None, pid: None, window: Some(35651598), num: None, window_properties: Some(WindowProperties { title: Some("vim src/* ~/s/i3wsr"), instance: Some("kitty"), class: Some("kitty"), window_role: None, window_type: None, transient_for: None }), marks: [], inhibit_idle: None, idle_inhibitors: None, shell: None, visible: None, output: Some("HDMI-1") }
[WINDOW EVENT] Change: Focus, Container: Node { id: 272455520, name: Some("i3wsr --verbose ~"), node_type: Con, border: Pixel, current_border_width: 6, layout: SplitH, percent: Some(0.5), rect: Rect { x: 19, y: 1063, width: 1330, height: 1030 }, window_rect: Rect { x: 6, y: 6, width: 1318, height: 1018 }, deco_rect: Rect { x: 0, y: 0, width: 0, height: 0 }, geometry: Rect { x: 0, y: 0, width: 1920, height: 1080 }, urgent: false, focused: true, focus: [], floating: Some(AutoOff), nodes: [], floating_nodes: [], sticky: false, representation: None, fullscreen_mode: Some(0), scratchpad_state: Some(None), app_id: None, pid: None, window: Some(16777230), num: None, window_properties: Some(WindowProperties { title: Some("i3wsr --verbose ~"), instance: Some("kitty"), class: Some("kitty"), window_role: None, window_type: None, transient_for: None }), marks: [], inhibit_idle: None, idle_inhibitors: None, shell: None, visible: None, output: Some("HDMI-1") }
[WORKSPACE EVENT] Change: Init, Current: Some(Node { id: 272788496, name: Some("2"), node_type: Workspace, border: Pixel, current_border_width: -1, layout: SplitH, percent: None, rect: Rect { x: 0, y: 0, width: 3840, height: 2160 }, window_rect: Rect { x: 0, y: 0, width: 0, height: 0 }, deco_rect: Rect { x: 0, y: 0, width: 0, height: 0 }, geometry: Rect { x: 0, y: 0, width: 0, height: 0 }, urgent: false, focused: false, focus: [], floating: Some(AutoOff), nodes: [], floating_nodes: [], sticky: false, representation: None, fullscreen_mode: Some(0), scratchpad_state: Some(None), app_id: None, pid: None, window: None, num: Some(2), window_properties: None, marks: [], inhibit_idle: None, idle_inhibitors: None, shell: None, visible: None, output: Some("HDMI-1") }), Old: None
[WORKSPACE EVENT] Change: Focus, Current: Some(Node { id: 272350176, name: Some("1 kitty | firefox"), node_type: Workspace, border: Pixel, current_border_width: -1, layout: SplitH, percent: Some(1.0), rect: Rect { x: 4, y: 4, width: 3832, height: 2104 }, window_rect: Rect { x: 0, y: 0, width: 0, height: 0 }, deco_rect: Rect { x: 0, y: 0, width: 0, height: 0 }, geometry: Rect { x: 0, y: 0, width: 0, height: 0 }, urgent: false, focused: false, focus: [274263856, 272473280], floating: Some(AutoOff), nodes: [Node { id: 274263856, name: None, node_type: Con, border: Pixel, current_border_width: -1, layout: SplitV, percent: Some(0.3528288374313679), rect: Rect { x: 4, y: 4, width: 1352, height: 2104 }, window_rect: Rect { x: 0, y: 0, width: 0, height: 0 }, deco_rect: Rect { x: 0, y: 0, width: 0, height: 0 }, geometry: Rect { x: 0, y: 0, width: 0, height: 0 }, urgent: false, focused: false, focus: [272948656], floating: Some(AutoOff), nodes: [Node { id: 272948656, name: Some("vim src/* ~/s/i3wsr"), node_type: Con, border: Pixel, current_border_width: 6, layout: SplitH, percent: Some(1.0), rect: Rect { x: 19, y: 19, width: 1330, height: 1030 }, window_rect: Rect { x: 6, y: 6, width: 1318, height: 1018 }, deco_rect: Rect { x: 0, y: 0, width: 0, height: 0 }, geometry: Rect { x: 0, y: 0, width: 1920, height: 1080 }, urgent: false, focused: true, focus: [], floating: Some(AutoOff), nodes: [], floating_nodes: [], sticky: false, representation: None, fullscreen_mode: Some(0), scratchpad_state: Some(None), app_id: None, pid: None, window: Some(35651598), num: None, window_properties: Some(WindowProperties { title: Some("vim src/* ~/s/i3wsr"), instance: Some("kitty"), class: Some("kitty"), window_role: None, window_type: None, transient_for: None }), marks: [], inhibit_idle: None, idle_inhibitors: None, shell: None, visible: None, output: Some("HDMI-1") }], floating_nodes: [], sticky: false, representation: None, fullscreen_mode: Some(0), scratchpad_state: Some(None), app_id: None, pid: None, window: None, num: None, window_properties: None, marks: [], inhibit_idle: None, idle_inhibitors: None, shell: None, visible: None, output: Some("HDMI-1") }, Node { id: 272473280, name: None, node_type: Con, border: Pixel, current_border_width: -1, layout: SplitV, percent: Some(0.6471711625686322), rect: Rect { x: 1356, y: 4, width: 2480, height: 2104 }, window_rect: Rect { x: 0, y: 0, width: 0, height: 0 }, deco_rect: Rect { x: 0, y: 0, width: 0, height: 0 }, geometry: Rect { x: 0, y: 0, width: 0, height: 0 }, urgent: false, focused: false, focus: [272429872], floating: Some(AutoOff), nodes: [Node { id: 272429872, name: Some("JENNIE & Dominic Fike - Love Hangover (Official Video) - YouTube — Mozilla Firefox"), node_type: Con, border: Pixel, current_border_width: 6, layout: SplitH, percent: Some(1.0), rect: Rect { x: 1363, y: 19, width: 2458, height: 2074 }, window_rect: Rect { x: 6, y: 6, width: 2446, height: 2062 }, deco_rect: Rect { x: 0, y: 0, width: 0, height: 0 }, geometry: Rect { x: 1636, y: 9, width: 2194, height: 2092 }, urgent: false, focused: false, focus: [], floating: Some(AutoOff), nodes: [], floating_nodes: [], sticky: false, representation: None, fullscreen_mode: Some(0), scratchpad_state: Some(None), app_id: None, pid: None, window: Some(12583003), num: None, window_properties: Some(WindowProperties { title: Some("JENNIE & Dominic Fike - Love Hangover (Official Video) - YouTube — Mozilla Firefox"), instance: Some("Navigator"), class: Some("firefox"), window_role: Some("browser"), window_type: None, transient_for: None }), marks: [], inhibit_idle: None, idle_inhibitors: None, shell: None, visible: None, output: Some("HDMI-1") }], floating_nodes: [], sticky: false, representation: None, fullscreen_mode: Some(0), scratchpad_state: Some(None), app_id: None, pid: None, window: None, num: None, window_properties: None, marks: [], inhibit_idle: None, idle_inhibitors: None, shell: None, visible: None, output: Some("HDMI-1") }], floating_nodes: [], sticky: false, representation: None, fullscreen_mode: Some(1), scratchpad_state: Some(None), app_id: None, pid: None, window: None, num: Some(1), window_properties: None, marks: [], inhibit_idle: None, idle_inhibitors: None, shell: None, visible: None, output: Some("HDMI-1") }), Old: Some(Node { id: 272788496, name: Some("2"), node_type: Workspace, border: Pixel, current_border_width: -1, layout: SplitH, percent: None, rect: Rect { x: 0, y: 0, width: 3840, height: 2160 }, window_rect: Rect { x: 0, y: 0, width: 0, height: 0 }, deco_rect: Rect { x: 0, y: 0, width: 0, height: 0 }, geometry: Rect { x: 0, y: 0, width: 0, height: 0 }, urgent: false, focused: false, focus: [272455520], floating: Some(AutoOff), nodes: [Node { id: 272455520, name: Some("i3wsr --verbose ~"), node_type: Con, border: Pixel, current_border_width: 6, layout: SplitH, percent: Some(1.0), rect: Rect { x: 19, y: 1063, width: 1330, height: 1030 }, window_rect: Rect { x: 6, y: 6, width: 1318, height: 1018 }, deco_rect: Rect { x: 0, y: 0, width: 0, height: 0 }, geometry: Rect { x: 0, y: 0, width: 1920, height: 1080 }, urgent: false, focused: false, focus: [], floating: Some(AutoOff), nodes: [], floating_nodes: [], sticky: false, representation: None, fullscreen_mode: Some(0), scratchpad_state: Some(None), app_id: None, pid: None, window: Some(16777230), num: None, window_properties: Some(WindowProperties { title: Some("i3wsr --verbose ~"), instance: Some("kitty"), class: Some("kitty"), window_role: None, window_type: None, transient_for: None }), marks: [], inhibit_idle: None, idle_inhibitors: None, shell: None, visible: None, output: Some("HDMI-1") }], floating_nodes: [], sticky: false, representation: None, fullscreen_mode: Some(0), scratchpad_state: Some(None), app_id: None, pid: None, window: None, num: Some(2), window_properties: None, marks: [], inhibit_idle: None, idle_inhibitors: None, shell: None, visible: None, output: Some("HDMI-1") })
[COMMAND] rename workspace "2" to "2 kitty"
[INFO] Workspace on output: HDMI-1
[WINDOW EVENT] Change: Move, Container: Node { id: 272455520, name: Some("i3wsr --verbose ~"), node_type: Con, border: Pixel, current_border_width: 6, layout: SplitH, percent: Some(1.0), rect: Rect { x: 19, y: 1063, width: 1330, height: 1030 }, window_rect: Rect { x: 6, y: 6, width: 1318, height: 1018 }, deco_rect: Rect { x: 0, y: 0, width: 0, height: 0 }, geometry: Rect { x: 0, y: 0, width: 1920, height: 1080 }, urgent: false, focused: false, focus: [], floating: Some(AutoOff), nodes: [], floating_nodes: [], sticky: false, representation: None, fullscreen_mode: Some(0), scratchpad_state: Some(None), app_id: None, pid: None, window: Some(16777230), num: None, window_properties: Some(WindowProperties { title: Some("i3wsr --verbose ~"), instance: Some("kitty"), class: Some("kitty"), window_role: None, window_type: None, transient_for: None }), marks: [], inhibit_idle: None, idle_inhibitors: None, shell: None, visible: None, output: Some("HDMI-1") }
[WINDOW EVENT] Change: Focus, Container: Node { id: 272948656, name: Some("vim src/* ~/s/i3wsr"), node_type: Con, border: Pixel, current_border_width: 6, layout: SplitH, percent: Some(1.0), rect: Rect { x: 19, y: 19, width: 1330, height: 2074 }, window_rect: Rect { x: 6, y: 6, width: 1318, height: 2062 }, deco_rect: Rect { x: 0, y: 0, width: 0, height: 0 }, geometry: Rect { x: 0, y: 0, width: 1920, height: 1080 }, urgent: false, focused: true, focus: [], floating: Some(AutoOff), nodes: [], floating_nodes: [], sticky: false, representation: None, fullscreen_mode: Some(0), scratchpad_state: Some(None), app_id: None, pid: None, window: Some(35651598), num: None, window_properties: Some(WindowProperties { title: Some("vim src/* ~/s/i3wsr"), instance: Some("kitty"), class: Some("kitty"), window_role: None, window_type: None, transient_for: None }), marks: [], inhibit_idle: None, idle_inhibitors: None, shell: None, visible: None, output: Some("HDMI-1") }
[WORKSPACE EVENT] Change: Focus, Current: Some(Node { id: 272788496, name: Some("2"), node_type: Workspace, border: Pixel, current_border_width: -1, layout: SplitH, percent: None, rect: Rect { x: 0, y: 0, width: 3840, height: 2160 }, window_rect: Rect { x: 0, y: 0, width: 0, height: 0 }, deco_rect: Rect { x: 0, y: 0, width: 0, height: 0 }, geometry: Rect { x: 0, y: 0, width: 0, height: 0 }, urgent: false, focused: false, focus: [272455520], floating: Some(AutoOff), nodes: [Node { id: 272455520, name: Some("i3wsr --verbose ~"), node_type: Con, border: Pixel, current_border_width: 6, layout: SplitH, percent: Some(1.0), rect: Rect { x: 19, y: 1063, width: 1330, height: 1030 }, window_rect: Rect { x: 6, y: 6, width: 1318, height: 1018 }, deco_rect: Rect { x: 0, y: 0, width: 0, height: 0 }, geometry: Rect { x: 0, y: 0, width: 1920, height: 1080 }, urgent: false, focused: true, focus: [], floating: Some(AutoOff), nodes: [], floating_nodes: [], sticky: false, representation: None, fullscreen_mode: Some(0), scratchpad_state: Some(None), app_id: None, pid: None, window: Some(16777230), num: None, window_properties: Some(WindowProperties { title: Some("i3wsr --verbose ~"), instance: Some("kitty"), class: Some("kitty"), window_role: None, window_type: None, transient_for: None }), marks: [], inhibit_idle: None, idle_inhibitors: None, shell: None, visible: None, output: Some("HDMI-1") }], floating_nodes: [], sticky: false, representation: None, fullscreen_mode: Some(1), scratchpad_state: Some(None), app_id: None, pid: None, window: None, num: Some(2), window_properties: None, marks: [], inhibit_idle: None, idle_inhibitors: None, shell: None, visible: None, output: Some("HDMI-1") }), Old: Some(Node { id: 272350176, name: Some("1 kitty | firefox"), node_type: Workspace, border: Pixel, current_border_width: -1, layout: SplitH, percent: Some(1.0), rect: Rect { x: 4, y: 4, width: 3832, height: 2104 }, window_rect: Rect { x: 0, y: 0, width: 0, height: 0 }, deco_rect: Rect { x: 0, y: 0, width: 0, height: 0 }, geometry: Rect { x: 0, y: 0, width: 0, height: 0 }, urgent: false, focused: false, focus: [274263856, 272473280], floating: Some(AutoOff), nodes: [Node { id: 274263856, name: None, node_type: Con, border: Pixel, current_border_width: -1, layout: SplitV, percent: Some(0.3528288374313679), rect: Rect { x: 4, y: 4, width: 1352, height: 2104 }, window_rect: Rect { x: 0, y: 0, width: 0, height: 0 }, deco_rect: Rect { x: 0, y: 0, width: 0, height: 0 }, geometry: Rect { x: 0, y: 0, width: 0, height: 0 }, urgent: false, focused: false, focus: [272948656], floating: Some(AutoOff), nodes: [Node { id: 272948656, name: Some("vim src/* ~/s/i3wsr"), node_type: Con, border: Pixel, current_border_width: 6, layout: SplitH, percent: Some(1.0), rect: Rect { x: 19, y: 19, width: 1330, height: 2074 }, window_rect: Rect { x: 6, y: 6, width: 1318, height: 2062 }, deco_rect: Rect { x: 0, y: 0, width: 0, height: 0 }, geometry: Rect { x: 0, y: 0, width: 1920, height: 1080 }, urgent: false, focused: false, focus: [], floating: Some(AutoOff), nodes: [], floating_nodes: [], sticky: false, representation: None, fullscreen_mode: Some(0), scratchpad_state: Some(None), app_id: None, pid: None, window: Some(35651598), num: None, window_properties: Some(WindowProperties { title: Some("vim src/* ~/s/i3wsr"), instance: Some("kitty"), class: Some("kitty"), window_role: None, window_type: None, transient_for: None }), marks: [], inhibit_idle: None, idle_inhibitors: None, shell: None, visible: None, output: Some("HDMI-1") }], floating_nodes: [], sticky: false, representation: None, fullscreen_mode: Some(0), scratchpad_state: Some(None), app_id: None, pid: None, window: None, num: None, window_properties: None, marks: [], inhibit_idle: None, idle_inhibitors: None, shell: None, visible: None, output: Some("HDMI-1") }, Node { id: 272473280, name: None, node_type: Con, border: Pixel, current_border_width: -1, layout: SplitV, percent: Some(0.6471711625686322), rect: Rect { x: 1356, y: 4, width: 2480, height: 2104 }, window_rect: Rect { x: 0, y: 0, width: 0, height: 0 }, deco_rect: Rect { x: 0, y: 0, width: 0, height: 0 }, geometry: Rect { x: 0, y: 0, width: 0, height: 0 }, urgent: false, focused: false, focus: [272429872], floating: Some(AutoOff), nodes: [Node { id: 272429872, name: Some("JENNIE & Dominic Fike - Love Hangover (Official Video) - YouTube — Mozilla Firefox"), node_type: Con, border: Pixel, current_border_width: 6, layout: SplitH, percent: Some(1.0), rect: Rect { x: 1363, y: 19, width: 2458, height: 2074 }, window_rect: Rect { x: 6, y: 6, width: 2446, height: 2062 }, deco_rect: Rect { x: 0, y: 0, width: 0, height: 0 }, geometry: Rect { x: 1636, y: 9, width: 2194, height: 2092 }, urgent: false, focused: false, focus: [], floating: Some(AutoOff), nodes: [], floating_nodes: [], sticky: false, representation: None, fullscreen_mode: Some(0), scratchpad_state: Some(None), app_id: None, pid: None, window: Some(12583003), num: None, window_properties: Some(WindowProperties { title: Some("JENNIE & Dominic Fike - Love Hangover (Official Video) - YouTube — Mozilla Firefox"), instance: Some("Navigator"), class: Some("firefox"), window_role: Some("browser"), window_type: None, transient_for: None }), marks: [], inhibit_idle: None, idle_inhibitors: None, shell: None, visible: None, output: Some("HDMI-1") }], floating_nodes: [], sticky: false, representation: None, fullscreen_mode: Some(0), scratchpad_state: Some(None), app_id: None, pid: None, window: None, num: None, window_properties: None, marks: [], inhibit_idle: None, idle_inhibitors: None, shell: None, visible: None, output: Some("HDMI-1") }], floating_nodes: [], sticky: false, representation: None, fullscreen_mode: Some(0), scratchpad_state: Some(None), app_id: None, pid: None, window: None, num: Some(1), window_properties: None, marks: [], inhibit_idle: None, idle_inhibitors: None, shell: None, visible: None, output: Some("HDMI-1") })
[WINDOW EVENT] Change: Focus, Container: Node { id: 272455520, name: Some("i3wsr --verbose ~"), node_type: Con, border: Pixel, current_border_width: 6, layout: SplitH, percent: Some(1.0), rect: Rect { x: 19, y: 19, width: 3802, height: 2074 }, window_rect: Rect { x: 6, y: 6, width: 3790, height: 2062 }, deco_rect: Rect { x: 0, y: 0, width: 0, height: 0 }, geometry: Rect { x: 0, y: 0, width: 1920, height: 1080 }, urgent: false, focused: true, focus: [], floating: Some(AutoOff), nodes: [], floating_nodes: [], sticky: false, representation: None, fullscreen_mode: Some(0), scratchpad_state: Some(None), app_id: None, pid: None, window: Some(16777230), num: None, window_properties: Some(WindowProperties { title: Some("i3wsr --verbose ~"), instance: Some("kitty"), class: Some("kitty"), window_role: None, window_type: None, transient_for: None }), marks: [], inhibit_idle: None, idle_inhibitors: None, shell: None, visible: None, output: Some("HDMI-1") }
[WORKSPACE EVENT] Change: Rename, Current: Some(Node { id: 272788496, name: Some("2 kitty"), node_type: Workspace, border: Pixel, current_border_width: -1, layout: SplitH, percent: None, rect: Rect { x: 4, y: 4, width: 3832, height: 2104 }, window_rect: Rect { x: 0, y: 0, width: 0, height: 0 }, deco_rect: Rect { x: 0, y: 0, width: 0, height: 0 }, geometry: Rect { x: 0, y: 0, width: 0, height: 0 }, urgent: false, focused: false, focus: [272455520], floating: Some(AutoOff), nodes: [Node { id: 272455520, name: Some("i3wsr --verbose ~"), node_type: Con, border: Pixel, current_border_width: 6, layout: SplitH, percent: Some(1.0), rect: Rect { x: 19, y: 19, width: 3802, height: 2074 }, window_rect: Rect { x: 6, y: 6, width: 3790, height: 2062 }, deco_rect: Rect { x: 0, y: 0, width: 0, height: 0 }, geometry: Rect { x: 0, y: 0, width: 1920, height: 1080 }, urgent: false, focused: true, focus: [], floating: Some(AutoOff), nodes: [], floating_nodes: [], sticky: false, representation: None, fullscreen_mode: Some(0), scratchpad_state: Some(None), app_id: None, pid: None, window: Some(16777230), num: None, window_properties: Some(WindowProperties { title: Some("i3wsr --verbose ~"), instance: Some("kitty"), class: Some("kitty"), window_role: None, window_type: None, transient_for: None }), marks: [], inhibit_idle: None, idle_inhibitors: None, shell: None, visible: None, output: Some("HDMI-1") }], floating_nodes: [], sticky: false, representation: None, fullscreen_mode: Some(1), scratchpad_state: Some(None), app_id: None, pid: None, window: None, num: Some(2), window_properties: None, marks: [], inhibit_idle: None, idle_inhibitors: None, shell: None, visible: None, output: Some("HDMI-1") }), Old: None

So it looks like that code block is always triggering on every window move. The reason that nothing is observed when I move a window from higher number workspace to lower number workspace (e.g. W3 -> W1) is because two workspace commands are issued, first to W1 and then to W3, fast enough to appear instant.

See these logs I captured after performing a move from W3 -> W1:

[COMMAND] rename workspace "1" to "1 kitty"
[INFO] Workspace on output: HDMI-1
[COMMAND] rename workspace "3 kitty" to "3"
[INFO] Workspace on output: HDMI-1

It looks like the focus block is specific to Sway, since it was introduced in the sway compatibility commit. It can be skipped for i3 events?

Versions

blissful@haiqin > i3 --version
i3 version 4.24 (2024-11-06) © 2009 Michael Stapelberg and contributors

blissful@haiqin > i3wsr --version
i3wsr 3.1.1

blissful@haiqin > uname -a
Linux haiqin 6.12.28 #1-NixOS SMP PREEMPT_DYNAMIC Fri May  9 07:50:53 UTC 2025 x86_64 GNU/Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions