bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#31288: [PATCH v2] Make cairo build usable


From: Ari Roponen
Subject: bug#31288: [PATCH v2] Make cairo build usable
Date: Sun, 06 May 2018 15:36:55 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

Eli Zaretskii <address@hidden> writes:

> Thanks, pushed to the master branch.

Thank you very much. However, I just noticed that my patch doesn't work
with side-by-side split windows. The following patch should fix that.

>From 788f0fc62881152b03043057fe98178d77a6bb3a Mon Sep 17 00:00:00 2001
From: Ari Roponen <address@hidden>
Date: Sun, 6 May 2018 15:29:28 +0300
Subject: [PATCH] Fix cairo scrolling for side-by-side windows

* src/xterm.c (x_scroll_run) [USE_CAIRO]: Fix scrolling for
side-by-side split windows.
---
 src/xterm.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/xterm.c b/src/xterm.c
index 35e10568fa..3f956d950d 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -4260,6 +4260,7 @@ x_scroll_run (struct window *w, struct run *run)
 #ifdef USE_CAIRO
   if (FRAME_CR_CONTEXT (f))
     {
+      int wx = WINDOW_LEFT_EDGE_X (w);
       cairo_surface_t *s = cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
                                                       width, height);
       cairo_t *cr = cairo_create (s);
@@ -4270,8 +4271,8 @@ x_scroll_run (struct window *w, struct run *run)
 
       cr = FRAME_CR_CONTEXT (f);
       cairo_save (cr);
-      cairo_set_source_surface (cr, s, 0, to_y);
-      cairo_rectangle (cr, x, to_y, width, height);
+      cairo_set_source_surface (cr, s, wx, to_y);
+      cairo_rectangle (cr, wx, to_y, width, height);
       cairo_fill (cr);
       cairo_restore (cr);
       cairo_surface_destroy (s);
-- 
2.17.0


reply via email to

[Prev in Thread] Current Thread [Next in Thread]