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

Fix #2162 and #6477: Fullscreen-dependent functions not working in browsers #7538

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

necaTecnico
Copy link

An application or game developed on this platform, with a function depending on fullscreen mode, does not work. This includes entering or leaving fullscreen via the keyboard or the top buttons of the browser bar.

The RuntimeGamePixiRenderer in GDevelop had trouble detecting fullscreen changes in browsers, especially Chrome. While it worked fine in Electron, browsers struggled with detecting fullscreen state changes and updating UI elements properly.

The fix involved adding support for all browser-specific fullscreen events (fullscreen, webkit, moz) and ensuring the canvas resizes correctly when fullscreen changes. A test suite was created in newIDE/app/src/Utils/runtimegame-pixi-renderer.spec.js to verify these changes, including tests for different browsers and a failing test to ensure the suite works as expected.

Even though all tests pass and the code follows best practices, something is still not quite right when running in actual browsers. This suggests there might be browser-specific quirks or timing issues we haven't caught yet. The foundation is solid, but we may need to investigate deeper into browser behaviors to achieve perfect results An application or game developed on this platform, with a function depending on fullscreen mode, does not work. This includes entering or leaving fullscreen via the keyboard or the top buttons of the browser bar.

Given our last discussions and what I have coded and mentioned here, any suggestions on fixing this in a different way or something out of my hands which is missing, or something wrong? It is still not solving the bug, even though it seems to have the correct code. @ClementPasteau @Bouh @jonasfj I have managed with my professor to open a PR.

An application or game developed on this platform, with a function
depending on fullscreen mode, does not work. This includes entering
or leaving fullscreen via the keyboard or the top buttons of the
browser bar.

The RuntimeGamePixiRenderer in GDevelop had trouble detecting
fullscreen changes in browsers, especially Chrome. While it worked
fine in Electron, browsers struggled with detecting fullscreen state
changes and updating UI elements properly.

The fix involved adding support for all browser-specific fullscreen
events (fullscreen, webkit, moz) and ensuring the canvas resizes
correctly when fullscreen changes. A test suite was created in
newIDE/app/src/Utils/runtimegame-pixi-renderer.spec.js to verify
these changes, including tests for different browsers and a failing
test to ensure the suite works as expected.

Even though all tests pass and the code follows best practices,
something is still not quite right when running in actual browsers.
This suggests there might be browser-specific quirks or timing issues
we haven't caught yet. The foundation is solid, but we may need to
investigate deeper into browser behaviors to achieve perfect results
An application or game developed on this platform, with a function
depending on fullscreen mode, does not work. This includes entering
or leaving fullscreen via the keyboard or the top buttons of the
browser bar.
@necaTecnico necaTecnico requested a review from 4ian as a code owner April 7, 2025 10:23
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.

1 participant