unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Ari Roponen <ari.roponen@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 31288-done@debbugs.gnu.org
Subject: bug#31288: [PATCH v2] Make cairo build usable
Date: Sun, 06 May 2018 15:36:55 +0300	[thread overview]
Message-ID: <87a7td6jvc.fsf@gmail.com> (raw)
In-Reply-To: <83in82sawn.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 05 May 2018 12:35:04 +0300")

[-- Attachment #1: Type: text/plain, Size: 221 bytes --]

Eli Zaretskii <eliz@gnu.org> 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.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Fix-cairo-scrolling-for-side-by-side-windows.patch --]
[-- Type: text/x-patch, Size: 1236 bytes --]

From 788f0fc62881152b03043057fe98178d77a6bb3a Mon Sep 17 00:00:00 2001
From: Ari Roponen <ari.roponen@gmail.com>
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	other threads:[~2018-05-06 12:36 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-27 13:19 bug#31288: 27.0.50; [PATCH] Make cairo build somewhat usable Ari Roponen
2018-04-27 14:15 ` Eli Zaretskii
2018-04-27 14:35   ` Ari Roponen
2018-04-27 14:55     ` Eli Zaretskii
2018-04-27 15:51       ` Ari Roponen
2018-04-28  7:33 ` bug#31288: [PATCH v2] Make cairo build usable Ari Roponen
2018-05-05  9:35   ` Eli Zaretskii
2018-05-06 12:36     ` Ari Roponen [this message]
2018-05-06 18:29       ` Eli Zaretskii
     [not found]       ` <wltvfq1l5v.wl-mituharu@math.s.chiba-u.ac.jp>
2019-03-26  6:13         ` Ari Roponen
2019-03-26  7:45           ` YAMAMOTO Mitsuharu

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=87a7td6jvc.fsf@gmail.com \
    --to=ari.roponen@gmail.com \
    --cc=31288-done@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /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).