aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPhilipp Stephani2017-08-27 13:19:26 +0200
committerPhilipp Stephani2017-08-27 13:44:47 +0200
commit982ec0398cea6e41bcfc022c333b6f695fc03241 (patch)
tree8519706faaf238cd72fc36c3c074144f60664759 /src
parenta1faaf3092cf47a274c1f9b93c312bf917a50b92 (diff)
downloademacs-982ec0398cea6e41bcfc022c333b6f695fc03241.tar.gz
emacs-982ec0398cea6e41bcfc022c333b6f695fc03241.zip
* src/xterm.c (XTflash): Don’t use gdk_cairo_create in GDK 3.22+
Diffstat (limited to 'src')
-rw-r--r--src/xterm.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/xterm.c b/src/xterm.c
index fb220b335a4..d9a6df75d97 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -4018,7 +4018,13 @@ XTflash (struct frame *f)
4018 when the scroll bars and the edit widget share the same X window. */ 4018 when the scroll bars and the edit widget share the same X window. */
4019 GdkWindow *window = gtk_widget_get_window (FRAME_GTK_WIDGET (f)); 4019 GdkWindow *window = gtk_widget_get_window (FRAME_GTK_WIDGET (f));
4020#ifdef HAVE_GTK3 4020#ifdef HAVE_GTK3
4021#if GTK_CHECK_VERSION (3, 22, 0)
4022 cairo_region_t *region = gdk_window_get_visible_region (window);
4023 GdkDrawingContext *context = gdk_window_begin_draw_frame (window, region);
4024 cairo_t *cr = gdk_drawing_context_get_cairo_context (context);
4025#else
4021 cairo_t *cr = gdk_cairo_create (window); 4026 cairo_t *cr = gdk_cairo_create (window);
4027#endif
4022 cairo_set_source_rgb (cr, 1, 1, 1); 4028 cairo_set_source_rgb (cr, 1, 1, 1);
4023 cairo_set_operator (cr, CAIRO_OPERATOR_DIFFERENCE); 4029 cairo_set_operator (cr, CAIRO_OPERATOR_DIFFERENCE);
4024#define XFillRectangle(d, win, gc, x, y, w, h) \ 4030#define XFillRectangle(d, win, gc, x, y, w, h) \
@@ -4132,7 +4138,12 @@ XTflash (struct frame *f)
4132 4138
4133#ifdef USE_GTK 4139#ifdef USE_GTK
4134#ifdef HAVE_GTK3 4140#ifdef HAVE_GTK3
4141#if GTK_CHECK_VERSION (3, 22, 0)
4142 gdk_window_end_draw_frame (window, context);
4143 cairo_region_destroy (region);
4144#else
4135 cairo_destroy (cr); 4145 cairo_destroy (cr);
4146#endif
4136#else 4147#else
4137 g_object_unref (G_OBJECT (gc)); 4148 g_object_unref (G_OBJECT (gc));
4138#endif 4149#endif