aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYAMAMOTO Mitsuharu2019-06-21 09:25:47 +0900
committerYAMAMOTO Mitsuharu2019-06-21 09:25:47 +0900
commit2a229f495fe5c8be84b3c5718f87d86c8d06a644 (patch)
tree3eac91d29d7e8849ccc5d95bdfa310c9b3164aec
parent2da3305c3c335adcbc9e541b7c50e4e814df87d1 (diff)
downloademacs-2a229f495fe5c8be84b3c5718f87d86c8d06a644.tar.gz
emacs-2a229f495fe5c8be84b3c5718f87d86c8d06a644.zip
Fix blank tooltips on cairo (Bug#36298)
* src/xterm.h (x_cr_update_surface_desired_size) [USE_CAIRO]: Add extern. * src/xterm.c (x_cr_update_surface_desired_size) [USE_CAIRO]: Make non-static. * src/xfns.c (Fx_show_tip) [USE_CAIRO]: Call x_cr_update_surface_desired_size.
-rw-r--r--src/xfns.c4
-rw-r--r--src/xterm.c2
-rw-r--r--src/xterm.h1
3 files changed, 6 insertions, 1 deletions
diff --git a/src/xfns.c b/src/xfns.c
index c9fe3e11f2d..6d14fecde15 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -6956,6 +6956,10 @@ Text larger than the specified size is clipped. */)
6956 XMapRaised (FRAME_X_DISPLAY (tip_f), FRAME_X_WINDOW (tip_f)); 6956 XMapRaised (FRAME_X_DISPLAY (tip_f), FRAME_X_WINDOW (tip_f));
6957 unblock_input (); 6957 unblock_input ();
6958 6958
6959#ifdef USE_CAIRO
6960 x_cr_update_surface_desired_size (tip_f, width, height);
6961#endif /* USE_CAIRO */
6962
6959 w->must_be_updated_p = true; 6963 w->must_be_updated_p = true;
6960 update_single_window (w); 6964 update_single_window (w);
6961 set_buffer_internal_1 (old_buffer); 6965 set_buffer_internal_1 (old_buffer);
diff --git a/src/xterm.c b/src/xterm.c
index 9bb0b83916c..38bf0a224d4 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -345,7 +345,7 @@ x_cr_destroy_frame_context (struct frame *f)
345 } 345 }
346} 346}
347 347
348static void 348void
349x_cr_update_surface_desired_size (struct frame *f, int width, int height) 349x_cr_update_surface_desired_size (struct frame *f, int width, int height)
350{ 350{
351 if (FRAME_CR_SURFACE_DESIRED_WIDTH (f) != width 351 if (FRAME_CR_SURFACE_DESIRED_WIDTH (f) != width
diff --git a/src/xterm.h b/src/xterm.h
index 2bd2c0105f6..985648a1d98 100644
--- a/src/xterm.h
+++ b/src/xterm.h
@@ -1109,6 +1109,7 @@ extern int x_dispatch_event (XEvent *, Display *);
1109extern int x_x_to_emacs_modifiers (struct x_display_info *, int); 1109extern int x_x_to_emacs_modifiers (struct x_display_info *, int);
1110#ifdef USE_CAIRO 1110#ifdef USE_CAIRO
1111extern void x_cr_destroy_frame_context (struct frame *); 1111extern void x_cr_destroy_frame_context (struct frame *);
1112extern void x_cr_update_surface_desired_size (struct frame *, int, int);
1112extern cairo_t *x_begin_cr_clip (struct frame *, GC); 1113extern cairo_t *x_begin_cr_clip (struct frame *, GC);
1113extern void x_end_cr_clip (struct frame *); 1114extern void x_end_cr_clip (struct frame *);
1114extern void x_set_cr_source_with_gc_foreground (struct frame *, GC); 1115extern void x_set_cr_source_with_gc_foreground (struct frame *, GC);