Skip to content
This repository has been archived by the owner on Apr 18, 2022. It is now read-only.

Commit

Permalink
Fix cairo scrolling for side-by-side windows
Browse files Browse the repository at this point in the history
* src/xterm.c (x_scroll_run) [USE_CAIRO]: Fix scrolling for
side-by-side split windows.  (Bug#31288)
  • Loading branch information
arirop authored and Eli-Zaretskii committed May 6, 2018
1 parent 91e582a commit 6e362a3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/xterm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down

0 comments on commit 6e362a3

Please sign in to comment.