Skip to content

Conversation

ids1024
Copy link
Member

@ids1024 ids1024 commented Sep 30, 2025

This has been annoying me when using floating windows. Colored indicators appearing where they shouldn't (and don't with tiling drags) is a bit distracting.

This fix seems to work on a single output, but with multiple outputs messes up the focus indicators on the other output. Since the floating layout (but not the tiling layout) can show focus indicators on multiple outputs, and we only want to omit it on the output we drag a window from.

I thought modifying refresh_focus_stack not to remove a window from the stack if it in the SeatMoveGrabState might work, but it seems append_focus_stack is being called when the move grab starts? (In set_focus, called by process_input_event).

@git-f0x
Copy link
Contributor

git-f0x commented Sep 30, 2025

Could this potentially fix #453?

@Drakulix
Copy link
Member

Yeah I am not sure, if simply not drawing the focus indicator is the right approach here? I definitely would like to make sure, we actually keep the focus on the dragged window and don't send any unnecessary enter/leave events (especially given Xwayland misbehaving if we do).

(But maybe this is already the case the issue is just, that we use the focus stack for drawing and updating the Activated state? I haven't looked into this for quite some time.)

@git-f0x
Copy link
Contributor

git-f0x commented Sep 30, 2025

This PR did sound like just a visual fix, but wasn't sure. The dragged window definitely still stops being treated as focused (or even existing) since, as mentioned in the issue, the trailing dynamic workspace disappears if that window is the only one on the next-to-last dynamic workspace.

@ids1024
Copy link
Member Author

ids1024 commented Sep 30, 2025

Testing it, the window being dragged has keyboard focus (I can type into a terminal while dragging it around), so as far as I could tell only a visual change is needed; but there may be other issues I haven't noticed.

@git-f0x
Copy link
Contributor

git-f0x commented Sep 30, 2025

The linked issue contains some examples. E.g. the trailing dynamic workspace disappearing, or previously focused windows visually changing to focused (e.g. Firefox titlebar buttons becoming brighter) when the currently focused window is dragged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants