Open
Description
Issue description
There is a slight offset on the y -axis after the screen is filled with Init window InitWindow(0, 0, "raylib");
It appears to not be setting the window to undecorated but computing the window size as the full monitor size, so the window origin ends up at a -y.
Environment
Platform: Desktop
OS: Windows 11
GPU: AMD RX 7900 XTX
Reproducible in both the mingw32 compiler (VSCode) and msvc (VStudio)
Issue Screenshot
Interestingly this issue seems worse on VStudio.
Code Example
int main()
{
// Initialization
//--------------------------------------------------------------------------------------
InitWindow(0, 0, "raylib");
int currentMonitor = GetCurrentMonitor();
camera.position = Vector3{ 10.0f, 10.0f, 8.0f };
camera.target = Vector3{ 0.0f, 0.0f, 0.0f };
camera.up = Vector3{ 0.0f, 1.0f, 0.0f };
camera.fovy = 60.0f;
camera.projection = CAMERA_PERSPECTIVE;
//--------------------------------------------------------------------------------------
int targetFPS = GetMonitorRefreshRate(currentMonitor);
SetTargetFPS(targetFPS); // Set our game to run at the monitor refresh rate
//--------------------------------------------------------------------------------------
// Main game loop
while (!WindowShouldClose()) // Detect window close button or ESC key
{
UpdateDrawFrame();
}
// De-Initialization
//--------------------------------------------------------------------------------------
CloseWindow(); // Close window and OpenGL context
//--------------------------------------------------------------------------------------
return 0;
}
Current workarounds:
- SetConfigFlags(FLAG_FULLSCREEN_MODE);
- SetConfigFlags(FLAG_WINDOW_RESIZABLE);
InitWindow(screenWidth, screenHeight, "raylib [core] example - basic window");
MaximizeWindow();