From 1e704449928c65bd62919b7bc87280649ad92e56 Mon Sep 17 00:00:00 2001 From: KK Date: Sat, 4 Jul 2026 10:27:53 +0200 Subject: [PATCH] Fix render issue, seems like compositor / set window size interaction gone wrong, it produced maybe framebuffer of wrong size not filling entire screen --- src/text_editor.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/text_editor.cpp b/src/text_editor.cpp index 15794ad..720866d 100644 --- a/src/text_editor.cpp +++ b/src/text_editor.cpp @@ -1027,6 +1027,7 @@ int main(int argc, char **argv, char **envp) int hhalf = 1000; int xhalf = 100; int yhalf = 100; + Unused(xhalf); Unused(yhalf); #else SDL_DisplayID primary_display_id = SDL_GetPrimaryDisplay(); const SDL_DisplayMode *display_mode = SDL_GetCurrentDisplayMode(primary_display_id); @@ -1042,7 +1043,9 @@ int main(int argc, char **argv, char **envp) ReportErrorf("Couldn't create window! %s", SDL_GetError()); return 1; } +#if !OS_LINUX SDL_SetWindowPosition(SDLWindow, xhalf, yhalf); +#endif SDL_WindowGLContext = SDL_GL_CreateContext(SDLWindow); SDL_GL_MakeCurrent(SDLWindow, SDL_WindowGLContext); @@ -1064,10 +1067,12 @@ int main(int argc, char **argv, char **envp) SDL_StartTextInput(SDLWindow); SDL_SetEventEnabled(SDL_EVENT_DROP_FILE, true); SDL_GL_SetSwapInterval(1); // vsync + { float scale = SDL_GetWindowDisplayScale(SDLWindow); if (scale != 1.0f) DPIScale = scale; } + SDL_SyncWindow(SDLWindow); // InitBuffers {