Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reactivate after output switch #1024

Closed
wants to merge 2 commits into from
Closed

Conversation

wash2
Copy link
Contributor

@wash2 wash2 commented Dec 5, 2024

Alt tab relies on changes to the activated state, but if there is a single window on each output, they are always activated. This forces activation state changes so that the events are sent to indicate the focus change if an output changes and the newly focused window is already activated. This should work properly with pop-os/cosmic-launcher#225 & pop-os/launcher#249.

I think there is a cleaner way of doing this if toplevel's also had a focused state, which could only ever set for one window at a time. but this works if we want to avoid adding something like that.

Drakulix and others added 2 commits December 4, 2024 18:52
Alt tab relies on changes to the activated state, but if there is a single window on each output, they are always activated. This forces activation state changes so that the events are sent to indicate the focus change.
@wash2 wash2 requested a review from Drakulix December 5, 2024 02:36
@Drakulix
Copy link
Member

Drakulix commented Dec 5, 2024

Hmm interesting idea. I previously thought about making sure the Activated state only every applies to the last window getting focus, that was this attempt (though I didn't spent time debugging it and making sure it actually works): https://github.com/pop-os/cosmic-comp/pull/889/files

Visually this is of course a bit different to current cosmic behaviour, but given Activated is meant to convey focus, I think that is cleaner? I don't have a strong preference on either though..

@wash2
Copy link
Contributor Author

wash2 commented Dec 5, 2024

Does the activated state affect the rate that applications receive frame events? I guess there is at least a visual difference if all monitors have an activated app or just one. @pop-os/ux do you think one way is better?

@maria-komarova
Copy link

I'm not sure I fully understand the problem. There should only be one focused window at a time.

@Drakulix
Copy link
Member

Drakulix commented Dec 5, 2024

I'm not sure I fully understand the problem. There should only be one focused window at a time.

The problem is, that right now visually (except for the focus indicator) on each monitor one window will appear focused (only the one on the active output will actually get the indicator and be able to receive input).

Since that "appear focus"-state is used by some components to determine the focused state, we have some problems with that behaviour, that could be solved, by simply making all windows on non-focused outputs appear unfocused.

That would however be a slight deviation from the current user-experience.

@Drakulix Drakulix closed this Dec 5, 2024
@Drakulix Drakulix deleted the reactivate-after-output-switch branch December 5, 2024 17:37
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