From: Ari Roponen <ari.roponen@gmail.com>
To: Dmitry Gutov <dgutov@yandex.ru>
Cc: 33442@debbugs.gnu.org
Subject: bug#33442: 26.1.90; Cairo side-by-side windows scrolling fix should be cherry-picked
Date: Thu, 29 Nov 2018 14:15:41 +0200 [thread overview]
Message-ID: <87mupst6z6.fsf@gmail.com> (raw)
In-Reply-To: <08133af3-3f70-1634-e162-ae6cfe26767f@yandex.ru> (Dmitry Gutov's message of "Thu, 22 Nov 2018 16:05:18 +0200")
Dmitry Gutov <dgutov@yandex.ru> writes:
> On 22.11.2018 14:19, Ari Roponen wrote:
>
>> That seems to be it: Starting Emacs with
>> GDK_SCALE=2 emacs -Q
>> shows the problem here, too.
>
> Thanks for that. I've just tried a --with-cairo build with
>
> GDK_SCALE=1 emacs
>
> and it seems to work well, (even) without your extra patch. Aside from
> the expected problems with toolbar icons and scrollbar (too small),
> which I don't use anyway.
With the following patch, GDK_SCALE=2 seems to work for me.
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
next prev parent reply other threads:[~2018-11-29 12:15 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-20 8:15 bug#33442: 26.1.90; Cairo side-by-side windows scrolling fix should be cherry-picked Ari Roponen
2018-11-20 15:58 ` Eli Zaretskii
2018-11-20 16:16 ` Dmitry Gutov
2018-11-20 17:14 ` Eli Zaretskii
2018-11-21 7:11 ` Ari Roponen
2018-11-21 21:40 ` Dmitry Gutov
2018-11-22 6:44 ` Ari Roponen
2018-11-22 12:03 ` Dmitry Gutov
2018-11-22 12:19 ` Ari Roponen
2018-11-22 14:05 ` Dmitry Gutov
2018-11-22 14:52 ` Eli Zaretskii
2018-11-22 15:22 ` Dmitry Gutov
2018-11-29 13:59 ` Dmitry Gutov
2018-11-29 12:15 ` Ari Roponen [this message]
2018-11-29 13:19 ` Robert Pluim
2018-11-29 14:06 ` Eli Zaretskii
2018-11-30 12:31 ` Ari Roponen
2018-12-08 9:55 ` Eli Zaretskii
2018-12-08 10:42 ` Dmitry Gutov
2018-12-08 11:15 ` Eli Zaretskii
2018-12-08 13:03 ` Dmitry Gutov
2018-12-08 14:24 ` Eli Zaretskii
2018-12-08 14:45 ` Dmitry Gutov
2018-12-09 22:08 ` Robert Pluim
2018-12-10 6:20 ` Eli Zaretskii
2018-12-10 13:23 ` Robert Pluim
2018-12-11 2:33 ` Dmitry Gutov
2018-12-11 3:37 ` Dmitry Gutov
2018-12-11 6:31 ` Eli Zaretskii
2018-12-11 6:27 ` Eli Zaretskii
2018-11-29 14:07 ` Dmitry Gutov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87mupst6z6.fsf@gmail.com \
--to=ari.roponen@gmail.com \
--cc=33442@debbugs.gnu.org \
--cc=dgutov@yandex.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).