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

(#3309) selecting a correct next window after the focused one is closed or disabled #3385

Closed
wants to merge 2 commits into from

Conversation

mattkae
Copy link
Contributor

@mattkae mattkae commented May 9, 2024

fixed #3309

What's new?

  • When a focused window closes, we first try to select the next window given the previous scheme. If that doesn't work, we choose the other scheme. If that doesn't work, we select no window.
  • Moved the BasicWindowManager check for is_active_window below policy->advise_delete_window. In this way, we only call BasicWindowManager::refocus if the active window remains unchaged after the advise

@mattkae mattkae requested a review from a team as a code owner May 9, 2024 20:34
@mattkae mattkae requested a review from Saviq May 9, 2024 20:35
Copy link
Contributor

@RAOF RAOF left a comment

Choose a reason for hiding this comment

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

If I understand this correctly, what this change will do is:
when the currently focused window is closed, do the equivalent of Alt-Tab or Alt-` depending on which one the user used last?

That doesn't seem like reasonable behaviour to me, so maybe I'm misunderstanding the change?

@mattkae
Copy link
Contributor Author

mattkae commented May 10, 2024

If I understand this correctly, what this change will do is: when the currently focused window is closed, do the equivalent of Alt-Tab or Alt-` depending on which one the user used last?

That doesn't seem like reasonable behaviour to me, so maybe I'm misunderstanding the change?

Your understanding is correct. The reason for this is that you want to select the next app/window in the focus order. Hence, the next available one could be found by Alt + Tab/Tick depending on their last action.

@mattkae mattkae requested a review from RAOF May 14, 2024 10:13
@AlanGriffiths
Copy link
Collaborator

Your understanding is correct. The reason for this is that you want to select the next app/window in the focus order. Hence, the next available one could be found by Alt + Tab/Tick depending on their last action.

I too don't find this reasonable.

When I close a window I am not thinking about whether I last used Alt-Tab or Alt-Tick and don't expect the result to depend on it. I expect the next window in the focus order, not "the next window of another app" nor "the next window of the same app".

@AlanGriffiths
Copy link
Collaborator

I do agree though, that the current behaviour needs fixing

@mattkae
Copy link
Contributor Author

mattkae commented Jun 10, 2024

I think I should revisit this later. I have a plan to do a full refactor of the focus system here, and this bug would be easily fixed by such a refactor

@mattkae mattkae closed this Jun 10, 2024
@mattkae mattkae deleted the bugfix/3309 branch June 10, 2024 15:24
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.

Closing a window brings one of the remaining windows of the same client to the front
3 participants