From 9f9978fb9898d668176e3848c116fe5798e914de Mon Sep 17 00:00:00 2001 From: Igor Stepanov Date: Fri, 10 Oct 2025 17:42:22 +0300 Subject: [PATCH] fix focus problem --- src/window/detail/window_sdl.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/window/detail/window_sdl.cpp b/src/window/detail/window_sdl.cpp index c60870eb1..4b5942dfe 100644 --- a/src/window/detail/window_sdl.cpp +++ b/src/window/detail/window_sdl.cpp @@ -149,7 +149,8 @@ window_sdl::window_sdl(DisplaySettings *settings, std::string title) noexcept { } SDL_WindowFlags flags = SDL_WINDOW_OPENGL | SDL_WINDOW_RESIZABLE | - SDL_WINDOW_HIGH_PIXEL_DENSITY; + // For process mouse clicks when not focused + SDL_WINDOW_NOT_FOCUSABLE; if (settings->fullscreen.get()) { flags |= SDL_WINDOW_FULLSCREEN; @@ -184,8 +185,6 @@ window_sdl::window_sdl(DisplaySettings *settings, std::string title) noexcept { SDL_GL_SetAttribute( SDL_GL_CONTEXT_FLAGS, SDL_GL_CONTEXT_FORWARD_COMPATIBLE_FLAG ); - // ?? - // SDL_GL_SetAttribute(SDL_WINDOW_ALLOW_HIGHDPI, false); #endif SDL_GL_SetAttribute(SDL_GL_MULTISAMPLEBUFFERS, settings->samples.get()); SDL_GL_SetAttribute(SDL_GL_RED_SIZE, 8);