Repository navigation
fix(focus): don't suppress focus handling when the pointer hovers the dock and a window is focused - #110
Merged
Conversation
…k and a window is focused
victor402002
force-pushed
the
fix/focus-skip-dock-pointer
branch
from
October 6, 2026 15:14
a3f2ea1 to
2d97c6c
Compare
Contributor
Author
|
Thanks! I ran the project's own checks on this branch to make sure the change is clean:
Live behaviour (extension run with
Note: |
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.
Problem
src/extension.ts:2698skips the focus handler wheneverWindow.clutter_focus_is_shell_panel()returns true. That helper checks both the keyboard focus and the pointer hover position (window.ts::clutter_focus_is_shell_panel), and the dock/dash app icons matchis_panel_actor()(they areoverview-tileactors whose ancestor is the dash).As a result, merely hovering the dock/panel makes O-Tiling skip its entire focus handling even when a real window just gained focus.
Measured with a temporary instrumented build (log-level 4, ~1 h): 132 skips, of which 21/22 happened while a real window was focused (
brave-browser, Nautilus, Terminal…). Consequences:on_focused()is not called, soprev_focused, borders and the refocus/restore logic are not updated.Full report + evidence: #108
Fix
Only skip when the shell truly holds focus (i.e. no real window is focused):
This keeps the intended protection (don't process while a panel popup/menu holds focus) but no longer suppresses handling of a legitimate window focus change.
Verification
With
log-level=4, hovering the dock while switching windows (Alt+Tab):focus-window handler: shell-panel/dock actor detected — skippingfired repeatedly with a real window focused.get_focus_window = null(the new(no focused window)message). Zero skips with a real window focused.Fixes #108.