feat: add focus_first_tiled dispatcher - #1224
Open
EddieBrunstedt wants to merge 1 commit into
Open
Conversation
Focus the first visible tiled client in layout order on the focused monitor. The client is selected using the same VISIBLEON/ISFAKETILED traversal used by Mango's layout engine, so the action behaves consistently across layouts and follows ordering changes made by actions such as zoom. Floating and otherwise ineligible clients are skipped. Do nothing when no eligible client exists or when it is already focused, avoiding unnecessary cursor warping.
DreamMaoMao
force-pushed
the
main
branch
3 times, most recently
from
August 10, 2026 05:15
0efe75b to
20ad711
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds a
focus_first_tileddispatcher that focuses the first visible tiled window in layout order on the focused monitor. In a master/stack layout that's the master window.I tried scripting this over IPC first, but
focusiddoesn't warp the cursor, so with sloppyfocus the focus snaps back as soon as the mouse moves.The window is picked with the same
VISIBLEON/ISFAKETILEDwalk the layout code uses, so it agrees with whatever the layout puts first (after zoom, nmaster changes and so on) and skips floating windows. If there's no eligible window, or it's already focused, it does nothing, so the cursor never warps without reason.I've been running this daily for about two weeks without issues.
I think this fits as core functionality, but no hard feelings if you see it differently.