[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master a06ac9b6fd 2/2: Restore old PGTK scrolling code
From: |
Po Lu |
Subject: |
master a06ac9b6fd 2/2: Restore old PGTK scrolling code |
Date: |
Thu, 17 Mar 2022 00:01:02 -0400 (EDT) |
branch: master
commit a06ac9b6fdc0e6edc326c74240be1f7ba4e6471e
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>
Restore old PGTK scrolling code
* src/pgtkterm.c (pgtk_copy_bits): Restore old code using
cairo_surface_create_similar. (bug#54040)
---
src/pgtkterm.c | 15 ++++-----------
1 file changed, 4 insertions(+), 11 deletions(-)
diff --git a/src/pgtkterm.c b/src/pgtkterm.c
index 9f9768cf2a..e00ed7fa85 100644
--- a/src/pgtkterm.c
+++ b/src/pgtkterm.c
@@ -2940,20 +2940,13 @@ pgtk_copy_bits (struct frame *f, cairo_rectangle_t
*src_rect,
cairo_rectangle_t *dst_rect)
{
cairo_t *cr;
- GdkWindow *window;
cairo_surface_t *surface; /* temporary surface */
- int scale;
-
- window = gtk_widget_get_window (FRAME_GTK_WIDGET (f));
surface =
- gdk_window_create_similar_surface (window, CAIRO_CONTENT_COLOR_ALPHA,
- FRAME_CR_SURFACE_DESIRED_WIDTH (f),
- FRAME_CR_SURFACE_DESIRED_HEIGHT
- (f));
-
- scale = gtk_widget_get_scale_factor (FRAME_GTK_WIDGET (f));
- cairo_surface_set_device_scale (surface, scale, scale);
+ cairo_surface_create_similar (FRAME_CR_SURFACE (f),
+ CAIRO_CONTENT_COLOR_ALPHA,
+ (int) src_rect->width,
+ (int) src_rect->height);
cr = cairo_create (surface);
cairo_set_source_surface (cr, FRAME_CR_SURFACE (f), -src_rect->x,