Subject: bug#54040: 29.0.50; Text becomes blurry on PGTK/Wayland

From: Po Lu <[email-masked]>
Date: Fri, 18 Feb 2022 08:58:17 +0800

Thomas Jost <[email-masked]> writes:

> Attached is a patch that seems to solve this issue for me without
> completely reverting that commit. I'm not sure if it's really a correct
> fix; please email me if you need any more details or testing!

I understand why your fix works, but please see if this change fixes the
problem, thanks:

diff --git a/src/pgtkterm.c b/src/pgtkterm.c
index 65408801cf..bc47c0471d 100644
--- a/src/pgtkterm.c
+++ b/src/pgtkterm.c
@@ -2932,9 +2932,8 @@ pgtk_copy_bits (struct frame *f, cairo_rectangle_t *src_rect,
 
   surface =
     gdk_window_create_similar_surface (window, CAIRO_CONTENT_COLOR_ALPHA,
-				       FRAME_CR_SURFACE_DESIRED_WIDTH (f),
-				       FRAME_CR_SURFACE_DESIRED_HEIGHT
-				       (f));
+				       (int) src_rect->width,
+				       (int) src_rect->height);
 
   cr = cairo_create (surface);
   cairo_set_source_surface (cr, FRAME_CR_SURFACE (f), -src_rect->x,