Skip to content

Support keyboard navigation over multiple monitors in multitasking view#2536

Open
leolost2605 wants to merge 9 commits intomainfrom
leolost/focusable
Open

Support keyboard navigation over multiple monitors in multitasking view#2536
leolost2605 wants to merge 9 commits intomainfrom
leolost/focusable

Conversation

@leolost2605
Copy link
Member

@leolost2605 leolost2605 commented Sep 17, 2025

Instead of manually handling keyboard focus where needed, do it like GTK does it with some adaptations.

We have the FocusController which is added to the "root" focusable of a focus tree (e.g. mtv or window overview).

Then we have the focusable class which is subclassed by the actors in the actor tree where focus is needed. The focusable handles deciding which implementor gets the focus based on the direction.

We now also hide the focus indicator after 5 seconds.

Fixes #2651
Fixes #2648

We can easily add navigation via Tab now too but I would leave that to a follow up

@leolost2605 leolost2605 changed the title Leolost/focusable Support keyboard navigation over multiple monitors in multitasking view Sep 17, 2025
@leolost2605 leolost2605 force-pushed the leolost/focusable branch 4 times, most recently from 919ea31 to 139ae2f Compare November 23, 2025 14:26
@leolost2605 leolost2605 marked this pull request as ready for review November 23, 2025 14:30
@leolost2605 leolost2605 requested a review from a team November 23, 2025 14:32
@leolost2605 leolost2605 force-pushed the leolost/focusable branch 2 times, most recently from d0aa36a to 6507c10 Compare November 26, 2025 15:26
@leolost2605 leolost2605 mentioned this pull request Nov 26, 2025
5 tasks
@danirabbit danirabbit moved this to Needs review in OS 8.1.0 Dec 1, 2025
@danirabbit danirabbit removed this from OS 8.1.0 Dec 15, 2025
@danirabbit danirabbit moved this to Needs review in OS 8.1.1 Dec 15, 2025
@danirabbit

This comment was marked as outdated.

@danirabbit danirabbit mentioned this pull request Jan 21, 2026
@leolost2605 leolost2605 force-pushed the leolost/focusable branch 2 times, most recently from 87170b0 to a57c179 Compare January 30, 2026 18:56
@leolost2605
Copy link
Member Author

@lenemter I've added two commits on top that rename focusable to widget and then actortarget to widget target. Let me know what you think!

@danirabbit danirabbit requested a review from lenemter February 2, 2026 19:54
@lenemter
Copy link
Member

lenemter commented Feb 2, 2026

@leolost2605 I think it would be better to leave ActorTarget as is, rename Focusable to Widget, and make Widget subclass ActorTarget. This way Widget uses gesture infrastructure, not the other way around. What do you think?

@danirabbit danirabbit added this to OS 9 Feb 5, 2026
@danirabbit danirabbit removed this from OS 8.1.1 Feb 5, 2026
@danirabbit danirabbit moved this to Needs Review in OS 9 Feb 5, 2026
@leolost2605
Copy link
Member Author

leolost2605 commented Feb 7, 2026

@lenemter sure we can do that, I updated it.
Seems like something broke active shape correctly displaying (on fractional scaling?) but it's also on main and I'll open an issue for that #2756
Screenshot from 2026-02-07 13 45 52@1x

Copy link
Member

@lenemter lenemter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For some reason when I hold down left/right arrows in with window focused and then release it, the left/right continues to be repeated

}

private void set_focus_visible (bool visible) {
actor.set_qdata (focus_visible_quark, visible);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should check if actor is Widget and use property to store the data, since we don't use qdata anywhere else

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Needs Review

Development

Successfully merging this pull request may close these issues.

Cannot select window by keyboard in multitasking view after workspace switching Pressing Esc doesn't close multitasking view

3 participants