GNU bug report logs -
#33442
26.1.90; Cairo side-by-side windows scrolling fix should be cherry-picked
Previous Next
Reported by: Ari Roponen <ari.roponen <at> gmail.com>
Date: Tue, 20 Nov 2018 08:16:02 UTC
Severity: normal
Tags: fixed
Found in version 26.1.90
Fixed in version 26.2
Done: Robert Pluim <rpluim <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Eli Zaretskii <eliz <at> gnu.org> writes:
>> From: Robert Pluim <rpluim <at> gmail.com>
>> Date: Thu, 29 Nov 2018 14:19:56 +0100
>> Cc: 33442 <at> debbugs.gnu.org, Dmitry Gutov <dgutov <at> yandex.ru>
>>
>> > With the following patch, GDK_SCALE=2 seems to work for me.
>> >
>>
>> Works for me. Since this is all Cairo-only code, it could even go into
>> emacs-26, I think (with a ChangeLog and perhaps some comments).
>
> OK, let's do that.
>
The following patch fixes the scaling problem in Cairo builds. The
scrolling issue with side-by-side windows is in master branch (commit
6e362a32bc9d21f73a0f29ca6f45481edeea6f29), and can be cherry-picked.
From c76a784f7c345031f9bf1f88d2e4b13e44053638 Mon Sep 17 00:00:00 2001
From: Ari Roponen <ari.roponen <at> gmail.com>
Date: Fri, 30 Nov 2018 14:09:09 +0200
Subject: [PATCH 1/1] Fix scaling problem in cairo builds
* src/xterm.c (x_begin_cr_clip) [USE_GTK]:
(x_update_begin) [USE_CAIRO && USE_GTK]: Support scaling.
---
src/xterm.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/src/xterm.c b/src/xterm.c
index 3a7e31e712..42ddc4f5b1 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -360,10 +360,15 @@ x_begin_cr_clip (struct frame *f, GC gc)
if (! FRAME_CR_SURFACE (f))
{
+ int scale = 1;
+#ifdef USE_GTK
+ scale = xg_get_scale (f);
+#endif
+
FRAME_CR_SURFACE (f) =
cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
- FRAME_PIXEL_WIDTH (f),
- FRAME_PIXEL_HEIGHT (f));
+ scale * FRAME_PIXEL_WIDTH (f),
+ scale * FRAME_PIXEL_HEIGHT (f));
}
cr = cairo_create (FRAME_CR_SURFACE (f));
FRAME_CR_CONTEXT (f) = cr;
@@ -999,8 +1004,9 @@ x_update_begin (struct frame *f)
if (FRAME_GTK_WIDGET (f))
{
GdkWindow *w = gtk_widget_get_window (FRAME_GTK_WIDGET (f));
- width = gdk_window_get_width (w);
- height = gdk_window_get_height (w);
+ int scale = xg_get_scale (f);
+ width = scale * gdk_window_get_width (w);
+ height = scale * gdk_window_get_height (w);
}
else
#endif
--
2.19.2
This bug report was last modified 6 years and 161 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.