-
Notifications
You must be signed in to change notification settings - Fork 1k
Fix #2162 and #6477: Fullscreen-dependent functions not working in browsers #7538
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
base: master
Are you sure you want to change the base?
Conversation
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.
Hey @4ian, can you please have a look? |
Hello! Thanks for taking the time to open this PR. The main issue for me is that if this does not work, this will create more noise and complexity in the codebase :) I think we need to take a step back and understand:
|
Hi @4ian , thank you for reviewing this PR and sharing your concerns. I completely understand the need to avoid adding complexity if it doesn't lead to a fully reliable solution. My intention here was to start solving the bug and start a discussion to get feedback on a potential direction to address the fullscreen detection issue fully (I have done all the code related to solving the bug, but something deeper is very wrong), which seems to be inconsistent across browsers. As mentioned by @ClementPasteau earlier in #6477, opening a PR was necessary in order to move forward with a more productive back-and-forth discussion, so I worked with my professor to make that possible. I also wanted to follow up on the original discussion in #2162, which hasn't had any replies. Thanks again, and I'm open to any suggestions on how to better approach this or align with what the project needs. Best regards, |
Hi @ClementPasteau, think you can have a look please or leave some feedback, so we can continue our discussion? @jonasfj @Bouh also, if possible, I would like your input and feedback. Thanks for your time, once again, |
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.