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

Refactor fullscreen and maximized window logic. #3435

Closed
wants to merge 2 commits into from

Conversation

aadcg
Copy link
Member

@aadcg aadcg commented Jul 23, 2024

The new foreign interface architecture handles the state of the relevant window
slots (fullscreen-p, maximized-p) instead of setf-ing them on the renderer
packages. This replaces the need for the :skip-renderer-resize keyword.

Fixed bug in toggle-message-buffer, where the height of the buffer was being
probed incorrectly.

Refactor the handling of the window-state-event in GTK. It didn't account for
events where the window is no longer fullscreen or maximized.

Simplify implementation of toggle-fullscreen, toggle-maximize,
toggle-status-buffer and toggle-message-buffer.

As for the fullscreen rationale regarding the UI: when a fullscreen event is
emitted by JS's Fullscreen API, the status and message buffers are hidden. For
all other fullscreen events, the status and message buffers are kept. Note that
we can't hide the message buffer on fullscreen since then there would be no way
to get that important piece of information. On typical browsers, the equivalent
of the message buffer is a dynamically visible toolbar at the bottom left (and
it is still displayed on fullscreen).

Description

Supersedes #3410.

Checklist:

  • Git branch state is mergable.
  • Changelog is up to date (via a separate commit).
  • New dependencies are accounted for.
  • Documentation is up to date.
  • Compilation and tests ((asdf:test-system :nyxt/<renderer>))
    • No new compilation warnings.
    • Tests are sufficient.

@aadcg
Copy link
Member Author

aadcg commented Jul 23, 2024

@shamazmazum feel free to test as well.

@aadcg
Copy link
Member Author

aadcg commented Jul 23, 2024

I need to re-think some details. Not ready for review.

@jmercouris
Copy link
Member

OK! Let me know when!

@aadcg
Copy link
Member Author

aadcg commented Jul 25, 2024

Ready for review. I've tested on multiple window managers / desktop environments and didn't find any issues.

I'll merge tomorrow the latest.

See #3438 and #3439.

I'll work on #3439 soon, which will refactor the iteration in this PR. Nonetheless, this PR is benign and can be integrated in the 3-series. Unlike the one that will close #3439.

The new foreign interface architecture handles the state of the relevant window
slots (such as fullscreen-p) instead of doing that on the renderer packages.
This replaces the need for the :skip-renderer-resize keyword.

Fixed bug in toggle-message-buffer, where the height of the buffer was being
probed incorrectly.

Refactor how the window-state-event in handled in GTK.

Simplify implementation of toggle-fullscreen, toggle-maximize,
toggle-status-buffer and toggle-message-buffer.

In terms of the UI:

- a fullscreen invoked by the user or by the window manager expands the UI
fully (keeping the status and message buffers);

- a fullscreen requested by the renderer (e.g. fullscreen video stream) hide the
status and message buffers.
@aadcg aadcg closed this Jul 27, 2024
@aadcg aadcg deleted the fix-fullcreen-logic branch July 27, 2024 09:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants