From: Po Lu Date: Thu, 17 Mar 2022 03:59:56 +0000 (+0800) Subject: Restore old PGTK scrolling code X-Git-Tag: emacs-29.0.90~1931^2~1083 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a06ac9b6fdc0e6edc326c74240be1f7ba4e6471e;p=emacs.git Restore old PGTK scrolling code * src/pgtkterm.c (pgtk_copy_bits): Restore old code using cairo_surface_create_similar. (bug#54040) --- diff --git a/src/pgtkterm.c b/src/pgtkterm.c index 9f9768cf2ab..e00ed7fa85d 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,