diff --git a/docs/changelog.rst b/docs/changelog.rst index e8e3493c3..bd2c0e090 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -43,6 +43,9 @@ To update |kitty|, :doc:`follow the instructions `. - Fix a regression in 0.14.5 that caused rendering of private use glyphs with and without spaces to be identical (:iss:`2117`) +- Wayland: Fix incorrect scale used when first creating an OS window + (:iss:`2133`) + 0.14.6 [2019-09-25] --------------------- diff --git a/glfw/wl_platform.h b/glfw/wl_platform.h index 2d978c2b7..ee15384d5 100644 --- a/glfw/wl_platform.h +++ b/glfw/wl_platform.h @@ -156,6 +156,7 @@ typedef struct _GLFWwindowWayland // We need to track the monitors the window spans on to calculate the // optimal scaling factor. int scale; + bool initial_scale_notified; _GLFWmonitor** monitors; int monitorsCount; int monitorsSize; diff --git a/glfw/wl_window.c b/glfw/wl_window.c index 05a09d1b6..c9e94e799 100644 --- a/glfw/wl_window.c +++ b/glfw/wl_window.c @@ -75,6 +75,10 @@ static bool checkScaleChange(_GLFWwindow* window) wl_surface_set_buffer_scale(window->wl.surface, scale); return true; } + if (window->wl.monitorsCount > 0 && !window->wl.initial_scale_notified) { + window->wl.initial_scale_notified = true; + return true; + } return false; }