1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-18 11:50:38 -08:00

Fix cairo scrolling for side-by-side windows

Backport: Fixes Bug#33442.

* src/xterm.c (x_scroll_run) [USE_CAIRO]: Fix scrolling for
side-by-side split windows.  (Bug#31288)

(cherry picked from commit 6e362a32bc)
This commit is contained in:
Ari Roponen 2018-05-06 15:29:28 +03:00 committed by Robert Pluim
parent 5a7451c383
commit 0220391c00

View file

@ -4251,6 +4251,7 @@ x_scroll_run (struct window *w, struct run *run)
#ifdef USE_CAIRO #ifdef USE_CAIRO
if (FRAME_CR_CONTEXT (f)) if (FRAME_CR_CONTEXT (f))
{ {
int wx = WINDOW_LEFT_EDGE_X (w);
cairo_surface_t *s = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, cairo_surface_t *s = cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
width, height); width, height);
cairo_t *cr = cairo_create (s); cairo_t *cr = cairo_create (s);
@ -4261,8 +4262,8 @@ x_scroll_run (struct window *w, struct run *run)
cr = FRAME_CR_CONTEXT (f); cr = FRAME_CR_CONTEXT (f);
cairo_save (cr); cairo_save (cr);
cairo_set_source_surface (cr, s, 0, to_y); cairo_set_source_surface (cr, s, wx, to_y);
cairo_rectangle (cr, x, to_y, width, height); cairo_rectangle (cr, wx, to_y, width, height);
cairo_fill (cr); cairo_fill (cr);
cairo_restore (cr); cairo_restore (cr);
cairo_surface_destroy (s); cairo_surface_destroy (s);