From 4d80427908b3d54ed6f48a57a250f404b1951984 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 3 Oct 2022 21:46:34 +0530 Subject: [PATCH] Wayland: Fix background image scaling using tiled mode on high DPI screens --- docs/changelog.rst | 2 ++ kitty/shaders.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index fed7f4359..d84f3d895 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -48,6 +48,8 @@ Detailed list of changes - Fix :opt:`background_tint` not applying to window margins and padding (:iss:`3933`) +- Wayland: Fix background image scaling using tiled mode on high DPI screens + 0.26.3 [2022-09-22] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/kitty/shaders.c b/kitty/shaders.c index 169fcf13c..6a49e9a6b 100644 --- a/kitty/shaders.c +++ b/kitty/shaders.c @@ -425,7 +425,7 @@ draw_bg(OSWindow *w) { glUniform1i(bgimage_program_layout.image_location, BGIMAGE_UNIT); glUniform1f(bgimage_program_layout.opacity_location, OPT(background_opacity)); glUniform4f(bgimage_program_layout.sizes_location, - (GLfloat)w->window_width, (GLfloat)w->window_height, (GLfloat)w->bgimage->width, (GLfloat)w->bgimage->height); + (GLfloat)w->viewport_width, (GLfloat)w->viewport_height, (GLfloat)w->bgimage->width, (GLfloat)w->bgimage->height); glUniform1f(bgimage_program_layout.premult_location, w->is_semi_transparent ? 1.f : 0.f); GLfloat tiled = 0.f;; switch (OPT(background_image_layout)) {