Subject: bug#36298: Blank tooltips in Cairo

From: YAMAMOTO Mitsuharu <[email-masked]>
Date: Thu, 20 Jun 2019 11:15:47 +0900

unmerge 362
quit

On Thu, 20 Jun 2019 05:36:09 +0900,
Noam Postavsky wrote:
> 
> merge 36298 34819
> quit
> 
> Clément Pit-Claudel <[email-masked]> writes:
> 
> > In cairo builds, when x-gtk-use-system-tooltips is set to nil, running (x-show-tip "xyz") produce a blank tooltip on my machine (the tooltip has the right dimensions, but is blank).
> >
> > To reproduce, you can run the following:
> >
> >     emacs -Q --eval '(progn (setq x-gtk-use-system-tooltips nil) (x-show-tip "xyz"))'
> 
> This one happens in non-Cairo builds too.

Probably a separate issue.  It seems like a regression by a proposed
fix of Bug#23925 (not yet applied).  Please try below instead.

				     YAMAMOTO Mitsuharu
				[email-masked]

diff --git a/src/xterm.c b/src/xterm.c
index bc56e99513d..462028c1504 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -8835,7 +8835,11 @@ handle_one_xevent (struct x_display_info *dpyinfo,
         font_drop_xrender_surfaces (f);
       unblock_input ();
 #ifdef USE_CAIRO
-      if (f)
+      if (f
+#ifdef USE_GTK
+	  && FRAME_TOOLTIP_P (f)
+#endif
+	  )
 	x_cr_update_surface_desired_size (f, configureEvent.xconfigure.width,
 					  configureEvent.xconfigure.height);
 #endif