Skip to content

no_focus not honoured when swallowing #6591

@e5150

Description

@e5150

Welcome

  • Yes, I'm using the latest major release or the current development version. These are the only supported versions.
  • Yes, I've searched similar issues and discussions on GitHub and didn't find any.

Current Behavior

A window that is swallowed in a layout gets focus if the mouse is in the container, even if the window matches some no_focus criterion. (Only with focus_follows_mouse.)

Expected Behavior

The window not being focused, due to no_focus.

Reproduction Instructions

Place mouse somewhere in the lower 3/4 of the screen, then:

echo '{"layout":"splitv","nodes":[{"swallows":[{"class":"^URxvt$"}]},{"swallows":[{"instance":"^do-not-focus$"}]},{"swallows":[{"instance":"^do-not-focus$"}]},{"swallows":[{"instance":"^do-not-focus$"}]}]}' > test.json
i3-msg workspace test
i3-msg append_layout test.json
urxvt & # expected to keep focus
sleep 1
urxvt -name do-not-focus &
urxvt -name do-not-focus &
urxvt -name do-not-focus &

i3 version

Binary i3 version:  4.25-19-g098a025c+ © 2009 Michael Stapelberg and contributors
Running i3 version: 4.25-19-g098a025c+ (pid 31290)
Loaded i3 config:
  /home/lars/.config/i3/config (main) (last modified: fre 16 jan 2026 20:58:47, 1112 seconds ago)

The i3 binary you just called: /usr/bin/i3
The i3 binary you are running: i3

Config file

# i3 config file (v4)
no_focus   [instance="do-not-focus"]
focus_follows_mouse yes
bindsym Mod4+e exec --no-startup-id urxvt
bindsym Mod1+less workspace prev_on_output
# EOF

Linux distribution & Version

suse leap 16

Are you using a compositor?

I am sure I don't run any compositor

Logfile

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    4.25bugmissing-logRead the CONTRIBUTING.md file for instructions

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions