Subject: bug#20677: tooltips generate garbage

From: Angelo Graziosi <[email-masked]>
Date: Mon, 01 Jun 2015 17:58:36 +0200

Il 01/06/2015 16:36, Eli Zaretskii ha scritto:
>> Date: Mon, 01 Jun 2015 13:46:54 +0200
>> From: Angelo Graziosi <[email-masked]>
>> CC: [email-masked], [email-masked]
>>
>> OK. This master,
>>
>>
>> http://git.savannah.gnu.org/cgit/emacs.git/snapshot/emacs-7ac84a2570e1268cc040fcd529508307b2b22c01.tar.gz
>>
>> (http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=7ac84a2570e1268cc040fcd529508307b2b22c01)
>>
>> works as expected.
>>
>> Instead the next,
>>
>>
>> http://git.savannah.gnu.org/cgit/emacs.git/snapshot/emacs-ee14727ce033bae3bc11af35e7843604e5a5e635.tar.gz
>>
>> (http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=ee14727ce033bae3bc11af35e7843604e5a5e635)
>>
>> shows the tooltip garbage I described.
>>
>> For what I can see, the issue regards only the GTK build on GNU/Linux
>> (Linux Mint 17.1 64 bit, with GTK+ 3.10)
>
> Looks like the Cairo merge caused this.  Jan, could you take a look,
> please?

Hmm... given the issue and looking at the changes, this caught my attention:

--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -3824,8 +3824,7 @@ xg_update_scrollbar_pos (struct frame *f,
               above.  */
  	  oldw += (scale - 1) * oldw;
  	  oldx -= (scale - 1) * oldw;
-          x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
-                        oldx, oldy, oldw, oldh);
+          x_clear_area (f, oldx, oldy, oldw, oldh);

maybe, on linux+X Emacs needs something like this

# if def(...X11..)
   [...]
   x_clear_area (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f)...
#else
   x_clear_area (f, oldx, oldy, oldw, oldh)...
#endif

Ciao,
   Angelo.