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

Black background with wrong mouse position handling when fullscreen #26

Closed
FreePhoenix888 opened this issue Feb 29, 2024 · 4 comments
Closed

Comments

@FreePhoenix888
Copy link

Desktop.2024.03.01.-.00.11.13.02.mp4
Desktop.2024.03.01.-.00.07.21.01.mp4
@coderedart
Copy link
Owner

That's a limitation of glfw/platform from the older days. When a window goes fullscreen, it gets "exclusive" access to desktop and nothing else is rendered.

The workaround I use is to resize the window to width - 1 and height - 1 where width and height are dimensions of the screen. This keeps the window just less than fullscreen dimensions to not trigger the black screen.

@FreePhoenix888
Copy link
Author

That's a limitation of glfw/platform from the older days. When a window goes fullscreen, it gets "exclusive" access to desktop and nothing else is rendered.

The workaround I use is to resize the window to width - 1 and height - 1 where width and height are dimensions of the screen. This keeps the window just less than fullscreen dimensions to not trigger the black screen.

Thank you for your fast response! That is the solution I have just tried a few minutes ago and it is working

Also mouse position handling is not wrong, I just had to set window pos to 0,0

@FreePhoenix888
Copy link
Author

FreePhoenix888 commented Feb 29, 2024

That's a limitation of glfw/platform from the older days. When a window goes fullscreen, it gets "exclusive" access to desktop and nothing else is rendered.

Where have you learned this info from? :)

@coderedart
Copy link
Owner

@FreePhoenix888 mostly from search results when I was debugging this issue in the past https://devblogs.microsoft.com/directx/demystifying-full-screen-optimizations/ . fullscreen transparent window should give you a few google results.

The workaround was good enough for my use case, so I never bothered going further. Fullscreen also messes with always on top order flag, so the workaround was pretty much the only way forward.

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

No branches or pull requests

2 participants