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

Improve window state handling #261

Merged
merged 3 commits into from
Jun 27, 2024
Merged

Improve window state handling #261

merged 3 commits into from
Jun 27, 2024

Conversation

Ottatop
Copy link
Collaborator

@Ottatop Ottatop commented Jun 25, 2024

This PR comes with improvements to window state handling (floating, fullscreen, maximized).

Improvements include:

  • Pinnacle will now finally attempt to open Wayland windows as floating when necessary, like the save prompt in Firefox. This closes Detect Wayland windows that should be floating #85 which was opened a whopping 9 months ago haha
  • Fixed the bit where you could drag fullscreen and maximized windows when the window was previously floating
  • Fixed xterm taking like 5 seconds to open
    • In classic xwayland fashion, this introduces a regression where you now need to run Intellij Idea with _JAVA_AWT_WM_NONREPARENTING=1 to get it to appear correctly

Things that need doing and thinking about:

  • I really don't like what WindowElementState::floating_or_tiled is doing. It's currently pulling double duty as the holder for the current floating/tiled state of the window and it gets used as a marker for what state gets applied when exiting fullscreen or tiled mode; both "prescription" and "description". Find a way to separate its duties.
    • Unified floating_or_tiled with the fullscreen_or_maximized state, which now feeds into Pinnacle::update_window_state.
  • As a result of the above, the API should be updated to unify those states into something like enum { Tiled, Floating, Fullscreen, Maximized }

@Ottatop Ottatop added the enhancement New feature or request label Jun 25, 2024
Ottatop added 2 commits June 26, 2024 19:56
Toggling floating now actually does something on fullscreen and maximized windows
@Ottatop Ottatop marked this pull request as ready for review June 27, 2024 23:48
@Ottatop Ottatop merged commit 0b24e88 into main Jun 27, 2024
5 of 6 checks passed
@Ottatop Ottatop deleted the better_window_states branch June 27, 2024 23:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Detect Wayland windows that should be floating
1 participant