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

Move panel hiding to the shell clients #2239

Merged
merged 20 commits into from
Jan 26, 2025
Merged

Move panel hiding to the shell clients #2239

merged 20 commits into from
Jan 26, 2025

Conversation

leolost2605
Copy link
Member

@leolost2605 leolost2605 commented Jan 20, 2025

Requires #2229 (not anymore, we pass with_gesture for now, won't be a big change)

We rename WindowPositioner to PositionedWindow and introduce a class ShellWindow that derives from PositionedWindow.
The ShellWindow is the new thing that's used e.g. for centered windows.
It's responsible for showing and hiding the window with an animation that depends on the position (e.g. slide in and out for TOP and BOTTOM, opacity for CENTERED).
We need this because with the new shell group every shell window is responsible itself for when to hide and show depending on the state (e.g. open multitaskingview). Therefore we also introduce a ShellWindow.State flags enum which will cause the window to hide if at least one flag that indicates hide is set.
Currently only the multitasking view notifies all shellwindows (via the manager) when it's active so that they can hide accordingly but we might add more cases here. There's also a CUSTOM_HIDDEN state that can be used by consumers of the shell window to force hide it (e.g. the panel window which derives from it force hides depending on the hide mode).

@leolost2605 leolost2605 marked this pull request as ready for review January 23, 2025 17:46
@leolost2605 leolost2605 requested a review from a team January 23, 2025 17:46
@leolost2605
Copy link
Member Author

leolost2605 commented Jan 23, 2025

This is now ready and the final part for an autarkic shell group :)

It also prepares for a much better version of #2124

@leolost2605 leolost2605 requested a review from lenemter January 24, 2025 20:10
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.

There are a couple of bugs:

  1. Open 2 workspaces: 1st with a window and the send without window. Using touchpad switch from 2nd to 1st but cancel it and immediately after that open multitasking view. If you timing it right you can get a dock partially (or fully) hidden when it should be visible.

2. After reproducing the first bug I can't to cancel desktop switch animation? Not sure what's going on but I get window clones from the 1st workspace on the 2nd one and I can interact with them..? I can reproduce this in main as well

@leolost2605
Copy link
Member Author

Open 2 workspaces: 1st with a window and the send without window. Using touchpad switch from 2nd to 1st but cancel it and immediately after that open multitasking view. If you timing it right you can get a dock partially (or fully) hidden when it should be visible.

I've been trying for 5 minutes now but can't reproduce it :(
Could you maybe provide a screen recording or similar?

@lenemter
Copy link
Member

I cannot reproduce this issue anymore because of the second issue :(

@leolost2605
Copy link
Member Author

Ok we don't ignore incoming state changes anymore while a gesture is ongoing so this should hopefully fix the issue you observed :)

@leolost2605 leolost2605 requested a review from lenemter January 25, 2025 11:42
@lenemter
Copy link
Member

2025-01-25.16-19-15.mp4

Not fixed :(

@leolost2605
Copy link
Member Author

Ah ok my guess what's happening is that it's the same symptoms we observed in #2161. Could it be that the timing is so that you start the open multitasking gesture while the hide animation of the dock is playing? For example if I increase the animation duration in panel window I can reproduce this much more easily (e.g. also by triggering a show via the barrier and then while it's animating opening the multitasking view).
To fix this we require the initial progress changes from #2161 so I guess I'll go fix up the math there (the only reason it's still drafting) which is long overdue anyways :)

@leolost2605
Copy link
Member Author

@lenemter ok this should be fixed now and I can't reproduce it anymore even with slower animation settings :)

@lenemter
Copy link
Member

Not sure if it is in scope of this PR but when you switch workspace there's a delay in hiding the dock, and then when you open the multitasking view before thee dock was hidden the dock doesn't hide when it should.

2025-01-26.12-23-53.mp4

Also SafeWindowClone class is unused now, remove it please :)

@leolost2605
Copy link
Member Author

leolost2605 commented Jan 26, 2025

Not sure if it is in scope of this PR but when you switch workspace there's a delay in hiding the dock, and then when you open the multitasking view before thee dock was hidden the dock doesn't hide when it should.

@lenemter i'd say it's not in the scope of this PR since the underlying issue here is that due to the hide delay we only realize we should be hidden after a while and we can't do anything about it in the shell window because we're already in the one to one animation with the open multitasking gesture and if we would change direction or something there that would be really weird. It's pretty easy to solve in the hidetracker though which I would like to do in a follow up PR since it's not really related to the changes here :)

@lenemter lenemter merged commit b839f53 into main Jan 26, 2025
5 checks passed
@lenemter lenemter deleted the leolost/shell-window branch January 26, 2025 13:45
@lenemter lenemter mentioned this pull request Jan 26, 2025
16 tasks
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.

2 participants