-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
[core] GetCurrentMonitor() inconsistency between GLFW and SDL #3456
Comments
The GLFW delivery of (desktop) scaling information determines the current monitor (and its scaling) by determining which one the cursor is in. There might need to be some harmonization with that. |
IMHO, that's a good idea. Just need to add:
To L758 on |
Issue description
When building raylib and running a program in windowed mode,
GetCurrentMonitor()
returns the monitor containing the window's top-left corner when using GLFW (PLATFORM_DESKTOP). When using SDL (PLATFORM_DESKTOP_SDL), however, it returns the monitor containing the center of the window.Since raylib's SDL implementation of
GetCurrentMonitor()
just callsSDL_GetWindowDisplayIndex()
, this is expected, as this function from SDL really returns the monitor containing the center of the window, according to the documentation.Does anyone agree with the idea of changing the behavior on the GLFW implementation so it returns the monitor containing the center of the window for consistency? I think this would also make problems like #3391 (comment) and #3391 (comment) less common.
Environment
Linux (Xorg as display server and dwm as window manager).
Code Example
The text was updated successfully, but these errors were encountered: