From unknown Fri Sep 12 00:24:50 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#40513 <40513@debbugs.gnu.org> To: bug#40513 <40513@debbugs.gnu.org> Subject: Status: Tooltips with images Reply-To: bug#40513 <40513@debbugs.gnu.org> Date: Fri, 12 Sep 2025 07:24:50 +0000 retitle 40513 Tooltips with images reassign 40513 emacs submitter 40513 Andreas Matthias severity 40513 normal tag 40513 wontfix thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 08 16:50:08 2020 Received: (at submit) by debbugs.gnu.org; 8 Apr 2020 20:50:08 +0000 Received: from localhost ([127.0.0.1]:52938 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jMHeB-0000l2-GF for submit@debbugs.gnu.org; Wed, 08 Apr 2020 16:50:08 -0400 Received: from lists.gnu.org ([209.51.188.17]:42968) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jMHe9-0000ku-SR for submit@debbugs.gnu.org; Wed, 08 Apr 2020 16:50:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42213) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jMHe8-0000If-0k for bug-gnu-emacs@gnu.org; Wed, 08 Apr 2020 16:50:05 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, HTML_MESSAGE,URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jMHe6-0004XJ-7y for bug-gnu-emacs@gnu.org; Wed, 08 Apr 2020 16:50:03 -0400 Received: from mail-ed1-x52b.google.com ([2a00:1450:4864:20::52b]:45835) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jMHe6-0004Wt-0B for bug-gnu-emacs@gnu.org; Wed, 08 Apr 2020 16:50:02 -0400 Received: by mail-ed1-x52b.google.com with SMTP id m12so10452980edl.12 for ; Wed, 08 Apr 2020 13:50:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=A86StrBIZKbeR2OYWt2dwxhXxCk0V6LElhQmBKg5slo=; b=FrUJZEGtTc9xcntOR/7AHkLfAwxmx5W0wyS2iolmVZZC1kKaqomBw2pFCnoAC65CZE eHKtiWxD3/LGD9i5tm7TjJSM1w5WoprXFbBmKgRPijoyOQPN8vC7bKuUgvPuD2lshycl CINwf/V+U9/GoNCLcb3tTVX+ZyYK5z7cYvWaWn8GdOdQHZmzBAQOilC7HNI6ptfRBiXp FKJXxFl30vGZV8+dU0W2ZGuhWqODJ884RseImE/EZDmVbxg5a3CA8OlFT+ZmonfWeBnL oiQR+ZuUF2yeD4/6PQYWgXKrItwriJCEvymoFq/KBhMaoe4lcmamRTehrvvImLGzushZ ZBKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=A86StrBIZKbeR2OYWt2dwxhXxCk0V6LElhQmBKg5slo=; b=FWZUrK3bpdzK9/hHAz02GBHyh7N5xQUudSNrliVt6vxQVT1GawqqD7eXeZce9OWO7b /ZlISBrktyhXwTO1vE/lFSD/5jhY70vEvePpFjbc1IF+gp8dUeT+oFpItEQw1iFMzMsb qrfxocYgzrDKRjoq3Qk1uAlKDdZexnNdL3xjABTX6rpLq1/16SN7zuVIoWxJ6crHxrgN A+NzFSLPS6rbm3OYDkGSq4caO+p6za1jVd9eoZc4mSSxSEdv8ZUahBXk1l6MLYxI3xLL qZ2IWc9CHqtUuI+Q6php6LDapLne+Y74Kjo9Gobu8JKw0Y+M1axdKvWvj3wFlugo8Sre mlkw== X-Gm-Message-State: AGi0PuaidddVNBoITxmnX1F+H2BI58Z7Y/j8ruVETXxqgVqq7Z4tHJ+O JvqC2t/0W8ObGp4fE1Df0XXGcZH+cYTcWizY7c15oHY8 X-Google-Smtp-Source: APiQypLewt6bcRL2TmnDloXQKWhmQGql7jcXUVm6EJoFXEKNJ+S5bEmu5uTcdx5lvI2o37gkNAjsO+s4PNIcMnn4eQ0= X-Received: by 2002:a17:907:6fc:: with SMTP id yh28mr4132722ejb.326.1586379000113; Wed, 08 Apr 2020 13:50:00 -0700 (PDT) MIME-Version: 1.0 From: Andreas Matthias Date: Wed, 8 Apr 2020 22:49:48 +0200 Message-ID: Subject: Tooltips with images To: bug-gnu-emacs@gnu.org Content-Type: multipart/alternative; boundary="000000000000c7ef9105a2cda426" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::52b X-Spam-Score: 2.3 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: This bug report is probably related to #40047. I experience some weird behavior with tooltips. (progn (let* ((start (point)) (end (progn (insert "test") (point))) (ov (make-overlay start end))) (overlay-put ov 'help-echo (propertize "xxx" 'display '(image :type jpeg :file "~/foo.jpg")))) (displ [...] Content analysis details: (2.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 URIBL_BLOCKED ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [URIs: x.org] -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [209.51.188.17 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (andreas.matthias[at]gmail.com) 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 HTML_MESSAGE BODY: HTML included in message 2.0 SPOOFED_FREEMAIL No description available. X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --000000000000c7ef9105a2cda426 Content-Type: text/plain; charset="UTF-8" This bug report is probably related to #40047. I experience some weird behavior with tooltips. (progn (let* ((start (point)) (end (progn (insert "test") (point))) (ov (make-overlay start end))) (overlay-put ov 'help-echo (propertize "xxx" 'display '(image :type jpeg :file "~/foo.jpg")))) (display-buffer-other-frame (get-buffer-create "dummy"))) After evaluating this code (Do not click anywhere, this is important.) and moving the mouse pointer over "test" I get a tooltip displaying the image file foo.jpg. The tooltip appears as a box with a light yellow background color with sharp corners. But the moment I click anywhere on the desktop (not necessarily on an emacs frame) this tooltip changes it's appearance. Now the tooltip contains no image but the text "xxx". Furthermore the tooltip appears as a transparent black box with rounded corners. I suppose that the first tooltip I'm seeing is an emacs-tooltip while the second one is a gtk-tooltip. The code line creating an empty buffer is important. Without this line I never see the emacs-tooltip, but always the gtk-tooltip. The tests were done with (setq x-gtk-use-system-tooltips t). After setting (setq x-gtk-use-system-tooltips nil) the tooltip does not change any more. Now I always get an emacs-tooltip. In GNU Emacs 28.0.50 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.22.30, cairo version 1.15.10) of 2020-03-17 built on phoenix Repository revision: ac9acc1864b02b92de4eb2e98db7b5b0cd03e019 Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.11906000 System Description: Ubuntu 18.04.4 LTS Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Making completion list... funcall-interactively: End of buffer [3 times] Configured using: 'configure --with-imagemagick' Configured features: XPM JPEG TIFF GIF PNG RSVG CAIRO IMAGEMAGICK SOUND DBUS GSETTINGS GLIB NOTIFY INOTIFY GNUTLS LIBXML2 FREETYPE HARFBUZZ ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS PDUMPER LCMS2 GMP Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t global-eldoc-mode: t eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs format-spec rfc822 mml easymenu mml-sec password-cache epa derived epg epg-config gnus-util rmail rmail-loaddefs text-property-search time-date subr-x seq byte-opt gv bytecomp byte-compile cconv mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting cairo move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 44799 5180) (symbols 48 6297 1) (strings 32 15693 1667) (string-bytes 1 509547) (vectors 16 9297) (vector-slots 8 127644 10640) (floats 8 20 31) (intervals 56 194 0) (buffers 1000 12)) --000000000000c7ef9105a2cda426 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
This bug report is probably related to #40047.

I ex= perience some weird behavior with tooltips.

(progn
=C2=A0 (let* (= (start (point))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(end (progn (insert &q= uot;test") (point)))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(ov (make-ov= erlay start end)))
=C2=A0 =C2=A0 (overlay-put ov 'help-echo
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(propertize &quo= t;xxx" 'display '(image :type jpeg :file "~/foo.jpg"= ))))
=C2=A0 (display-buffer-other-frame (get-buffer-create "dummy&q= uot;)))


After evaluating this code (Do not click anywhere, this = is important.)
and moving the mouse pointer over "test" I get = a tooltip displaying the
image file foo.jpg. The tooltip appears as a bo= x with a light yellow
background color with sharp corners.

But t= he moment I click anywhere on the desktop (not necessarily on an
emacs f= rame) this tooltip changes it's appearance. Now
the tooltip contains= no image but the text "xxx". Furthermore the tooltip
appears = as a transparent black box with rounded corners.

I suppose that the = first tooltip I'm seeing is an emacs-tooltip while
the second one is= a gtk-tooltip.

The code line creating an empty buffer is important.= Without this line I
never see the emacs-tooltip, but always the gtk-too= ltip.

The tests were done with (setq x-gtk-use-system-tooltips t).
After setting (setq x-gtk-use-system-tooltips nil) the tooltip does n= ot
change any more. Now I always get an emacs-tooltip.



In GNU Emacs 28.0.50 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.22.30,= cairo version 1.15.10)
=C2=A0of 2020-03-17 built on phoenix
Reposito= ry revision: ac9acc1864b02b92de4eb2e98db7b5b0cd03e019
Repository branch:= master
Windowing system distributor 'The X.Org Foundation', ver= sion 11.0.11906000
System Description: Ubuntu 18.04.4 LTS

Recent = messages:
For information about GNU Emacs and the GNU system, type C-h C= -a.
Making completion list...
funcall-interactively: End of buffer [3= times]

Configured using:
=C2=A0'configure --with-imagemagick= '

Configured features:
XPM JPEG TIFF GIF PNG RSVG CAIRO IMAGE= MAGICK SOUND DBUS GSETTINGS GLIB
NOTIFY INOTIFY GNUTLS LIBXML2 FREETYPE = HARFBUZZ ZLIB TOOLKIT_SCROLL_BARS
GTK3 X11 XDBE XIM MODULES THREADS PDUM= PER LCMS2 GMP

Important settings:
=C2=A0 value of $LANG: en_US.UT= F-8
=C2=A0 locale-coding-system: utf-8-unix

Major mode: Lisp Inte= raction

Minor modes in effect:
=C2=A0 tooltip-mode: t
=C2=A0 g= lobal-eldoc-mode: t
=C2=A0 eldoc-mode: t
=C2=A0 electric-indent-mode:= t
=C2=A0 mouse-wheel-mode: t
=C2=A0 tool-bar-mode: t
=C2=A0 menu-= bar-mode: t
=C2=A0 file-name-shadow-mode: t
=C2=A0 global-font-lock-m= ode: t
=C2=A0 font-lock-mode: t
=C2=A0 blink-cursor-mode: t
=C2=A0= auto-composition-mode: t
=C2=A0 auto-encryption-mode: t
=C2=A0 auto-= compression-mode: t
=C2=A0 line-number-mode: t
=C2=A0 transient-mark-= mode: t

Load-path shadows:
None found.

Features:
(shado= w sort mail-extr emacsbug message rmc puny dired dired-loaddefs
format-s= pec rfc822 mml easymenu mml-sec password-cache epa derived epg
epg-confi= g gnus-util rmail rmail-loaddefs text-property-search time-date
subr-x s= eq byte-opt gv bytecomp byte-compile cconv mm-decode mm-bodies
mm-encode= mail-parse rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs
cl-lib s= endmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils
tooltip= eldoc electric uniquify ediff-hook vc-hooks lisp-float-type
mwheel term= /x-win x-win term/common-win x-dnd tool-bar dnd fontset image
regexp-opt= fringe tabulated-list replace newcomment text-mode elisp-mode
lisp-mode= prog-mode register page tab-bar menu-bar rfn-eshadow isearch
timer sele= ct scroll-bar mouse jit-lock font-lock syntax facemenu
font-core term/tt= y-colors frame minibuffer cl-generic cham georgian
utf-8-lang misc-lang = vietnamese tibetan thai tai-viet lao korean
japanese eucjp-ms cp51932 he= brew greek romanian slovak czech european
ethiopic indian cyrillic chine= se composite charscript charprop
case-table epa-hook jka-cmpr-hook help = simple abbrev obarray
cl-preloaded nadvice loaddefs button faces cus-fac= e macroexp files
text-properties overlay sha1 md5 base64 format env code= -pages mule
custom widget hashtable-print-readable backquote threads dbu= sbind
inotify lcms2 dynamic-setting system-font-setting font-render-sett= ing
cairo move-toolbar gtk x-toolkit x multi-tty make-network-process em= acs)

Memory information:
((conses 16 44799 5180)
=C2=A0(symbol= s 48 6297 1)
=C2=A0(strings 32 15693 1667)
=C2=A0(string-bytes 1 5095= 47)
=C2=A0(vectors 16 9297)
=C2=A0(vector-slots 8 127644 10640)
= =C2=A0(floats 8 20 31)
=C2=A0(intervals 56 194 0)
=C2=A0(buffers 1000= 12))
--000000000000c7ef9105a2cda426-- From debbugs-submit-bounces@debbugs.gnu.org Sat Apr 11 04:32:47 2020 Received: (at 40513) by debbugs.gnu.org; 11 Apr 2020 08:32:47 +0000 Received: from localhost ([127.0.0.1]:56153 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jNBZH-0002VX-Fe for submit@debbugs.gnu.org; Sat, 11 Apr 2020 04:32:47 -0400 Received: from mout.gmx.net ([212.227.15.19]:33787) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jNBZF-0002VJ-H4 for 40513@debbugs.gnu.org; Sat, 11 Apr 2020 04:32:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1586593958; bh=XZom+VBgLHeMgkv8xxm5D9R5XF5tRpgtYtR0Bo+Q2fc=; h=X-UI-Sender-Class:Subject:To:References:From:Date:In-Reply-To; b=Hq0bBVyo3jSL9/FTXdLbh+vJbwcrTEfG4R5jJCaMr03blYP71sMWuKLen2WzSC7sx RM/5xisvcGs0Rladin/I2gvVEA09FXvtyqWtqAUvPMauvesgzTu3bEGneXvHOhvMG4 Bx+FfPUp3Pyre1SxOLufz2QRfBPm4BKRXQGZc2R4= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from [192.168.1.102] ([212.95.5.250]) by mail.gmx.com (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MxDkw-1j3LN021Bw-00xb9H; Sat, 11 Apr 2020 10:32:38 +0200 Subject: Re: bug#40513: Tooltips with images To: Andreas Matthias , 40513@debbugs.gnu.org References: From: martin rudalics Message-ID: <4be32abc-412e-2d2d-aa4c-c245536c0d4d@gmx.at> Date: Sat, 11 Apr 2020 10:32:37 +0200 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:J3qRtmfM46W7wT8b/9d+UatZ4wLGVzFnJrLxkuRs5biWHv3cp1l u3R/HHvkIOQVf7UXlvopbX4idOV9eIHmcogXPiYO++/CEAaYcdMUmwC6QGViZXN4+3lNlsK +PI3k9Y1TycibCFPxMu6VOac2LMPxkgvpB05vOTahLex8hneyhSCMvL3xAC3rVxC815RfaC rIOiM925G+IApo8dL7muQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:8gHOYYMORXw=:YFNIi17t0vWMw7J0or5wTZ nRHd9WJJbArhmMaqELk2Hpb5d+mIt7t5uz1pNqDM+/9NCFvybqsH6Auw5agip8wtSZnpSdWNT MdiCl4s7bmOruy1CdqE2QOs36lZ4VHyJs3DLT6OuRFWZhfOt7/d8JFhbvy+GQQiYy8oB6fn54 FMaM5up4uYBZ5l2oPRFpy4Av6mVs4XXnLNHDBmoyp0sUrZWMAZG+oXj7ZtfrsRGdqCAXW5nN8 6f2rKABarNNs0ht9YIz2tA+O+G9u1ZMAv5ksqp2/6UzMvTgkVVEG1u7v0mu1RBOMvtdTZEIFP brXMFK0Mo/GtFIp93kWC/3LAzy/8Jr3pUzwjJlcVTBy3AoLlKUHe7qwPXCaYSuwrtOgvpvAa3 yQfNJLv6h2/OJoYD4WyPZv+NKFk4Xca4Jpa0R+ZsCKtq2JAdv/1OeZ5R/5bsjC8wfS6SpE3pu bYz4/tiVZEe9CSNL5yY3Zmu6pUfpTEZzO36K4DWIdQN1nDkM+8VxZFg8SrZd9PPUg8uYHKUzK unEIz2TcilMYH4Vo8LI3NHwxtLjvxwSMus4O/CaAZrvZk3AoOm5xwhrW0SHEYO3vh8mL3DWBK y9lFPqDAcfzJM5jcnUuFVG5JdQRyEwpkDw9gdewgW2jR8w97hoZXl5kPYPAGFO5c+rORoyMul 0f6N1L7S2w7l9HBoMqf3OSPQoRxOdCnI6bt8Z1QFG/w3v2hJPXViX+ze0ruCxghcuT9fDkUuK xYN1IkrzTzDPo6gINSq+QS0oKl2/k3BNz45/FlyOjenPRX4GqY7EQCzlnQo5v36Z+IpDZRrfq N4sAfNVwYk//mIS4KZwl+dhxgUA1nA7u8AC1W3j2yaxtVnX35eQInU9yDE7kxscqVfKLemHJK xX6WaS5/DGtGLo4TZVfyJ8PdHXdJCUYGirIw9XxjOlfXb7EFzWApksZ1pzBHNvZbWKcM78Ppn BpbF4z+fvF60A8rQ8IXI5/h+jbrogzd7VQhsEETN7TJrxVnq5Y6z3gXyE89n5tkJR5cR8v1OE PrPB+A4YipeHlsWUhoY8uGKhlaJXrW+cQdX2/AqUu6Db1KlBu06mATA16OZsugtHpaCrcSdia NidWnWB2++djT43Ux4ruM/5puDE3Qu+JJQbkQfUgaLf5SHUP+rTcoUGxIugO6m8WlM8cT6BZ4 fRPL19xvKXHAmx4Kg3OUY1oqNyIt2YXrn2ctMtUiPTNbIEyXapxElOXJqS5xugaUjeEMd/AY2 P1VC2EWgsH0GI0yKM X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 40513 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > This bug report is probably related to #40047. Despite the fact that both reports ask for tooltips to show images, they are not related. The behavior you see can be easily reproduced without using an image as display property. > I experience some weird behavior with tooltips. > > (progn > (let* ((start (point)) > (end (progn (insert "test") (point))) > (ov (make-overlay start end))) > (overlay-put ov 'help-echo > (propertize "xxx" 'display '(image :type jpeg :file > "~/foo.jpg")))) > (display-buffer-other-frame (get-buffer-create "dummy"))) > > > After evaluating this code (Do not click anywhere, this is important.) > and moving the mouse pointer over "test" I get a tooltip displaying the > image file foo.jpg. The tooltip appears as a box with a light yellow > background color with sharp corners. > > But the moment I click anywhere on the desktop (not necessarily on an > emacs frame) this tooltip changes it's appearance. Now > the tooltip contains no image but the text "xxx". Furthermore the tooltip > appears as a transparent black box with rounded corners. > > I suppose that the first tooltip I'm seeing is an emacs-tooltip while > the second one is a gtk-tooltip. Correct. > The code line creating an empty buffer is important. Without this line I > never see the emacs-tooltip, but always the gtk-tooltip. The crucial aspect here is that of popping up a new frame. > The tests were done with (setq x-gtk-use-system-tooltips t). > > After setting (setq x-gtk-use-system-tooltips nil) the tooltip does not > change any more. Now I always get an emacs-tooltip. The behavior you experience is strange and I have no full explanation for it. From the Emacs side it's all quite clear: When you move the mouse over "test", Emacs is informed that it should provide a tooltip text and position. When it tries to show that tooltip via 'x-show-tip' in xfns.c, that function calls xg_prepare_tooltip in gtkutil.c which returns FALSE because the value of the tooltip label (ttip_lbl) for the frame showing dummy has not been assigned yet (qttip_cb has not been run for that frame yet). As a consequence, the value of OK in 'x-show-tip' is false and due to its logic 'x-show-tip' assumes that for some reason GTK cannot show the tooltip and it will try to show a native Emacs tooltip instead. That's what you see first. Later, and in particular after you have clicked into any of your frames, the values of ttip_lbl will have been orderly set up for all frames and you will see the GTK tooltips as requested. Why GTK asks us to display the tooltip _for_ the dummy frame is beyond my knowledge. It's probably due to the fact that our window managers automatically put focus on the new, dummy frame while the mouse pointer hovers over the old *scratch* frame without selecting/focusing it. Try your example with (setq default-frame-alist '((no-focus-on-map . t))) set initially and you shouldn't be able to reproduce your scenario. Note that I can reproduce your behavior despite of the fact that I'm using focus follows mouse - as long as I don't move the mouse from _elsewhere_ into the *scratch* frame, that frame does not get focus. So here I just have to make sure that the mouse pointer will be over the *scratch* frame when the dummy frame gets created. Unfortunately, the problem cannot be debugged via GDB because anything you do in the debugger window will distract the original focus. In either case, I don't think that all this should be of any importance for you: If you want to show an image in a tooltip, you will have to use the native Emacs tooltip anyway, so set 'x-gtk-use-system-tooltips' to nil and you are done. If you insist on using GTK tooltips (something I recommend only to hardcore GTK fans) you will have to live with the fact that sometimes a native Emacs tooltip will pop up in case GTK has not caught up with initializing the tooltip data for a new frame. martin From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 18 14:27:47 2022 Received: (at 40513) by debbugs.gnu.org; 18 Aug 2022 18:27:47 +0000 Received: from localhost ([127.0.0.1]:56657 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oOkF8-0008Lf-RW for submit@debbugs.gnu.org; Thu, 18 Aug 2022 14:27:47 -0400 Received: from mail-vs1-f45.google.com ([209.85.217.45]:39687) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oOkF5-0008LI-7H for 40513@debbugs.gnu.org; Thu, 18 Aug 2022 14:27:45 -0400 Received: by mail-vs1-f45.google.com with SMTP id c3so2325309vsc.6 for <40513@debbugs.gnu.org>; Thu, 18 Aug 2022 11:27:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:mime-version:user-agent:references :in-reply-to:from:from:to:cc; bh=duZQ/kju6ZZgID34op7Ujc+Y1/U+3cBSM6PJ4qlPUdg=; b=m/lSADuxqyj2d1Uen1H5sqgap1D7uiXchzRrC5P5mc7nm34dR4FsZLYCoinGdXviHm retYihh5GSDDfHrbMGsVTjGtACEZFXukYri5cCWv4crReHizRUenQt72xmKfpRbPFlhu RYOlmJiHQeryECJYcB8uMWLtPTRwUrv95oogWDglM/U70gDkeeXfQQ0WGE4njaaODEvz 4aIQ8XgMnC6s4uNdZhYTCSmDb0Qx19Nip0/sDpXzjMkQ3nIq03Ay/J2jz9UmpKCfeCpp x5m9Sz1tpl2OJXx80bY/mJtN021P/bd3ZxkjHdmIfao0mT3+Bt9JDDEGRWlWyrPBeM0Z AoYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:mime-version:user-agent:references :in-reply-to:from:x-gm-message-state:from:to:cc; bh=duZQ/kju6ZZgID34op7Ujc+Y1/U+3cBSM6PJ4qlPUdg=; b=TtNuZU4+Wbzf/hsvwtgHbiNQgqtnvOjCoEtJ63NO0TzXPA/+UabfhdLVUxc/Kc2+XH W4XUbH4RKEMPiaZgT5YoSK3RMUTn1APo0NcSAGvzi2lJGKvPJnfpLfchhKQFY8/Rlwom JYMfRwGWe7LycBBnpiqyTqC/YsW7AmM7LQtiNiL3HwaBvWUI/08O9X04uhDkQvAjHnVg lXXvlVkuKxYOXWWGpxWgsV3Rjg8rOlZaCQoU8dnY5hJXqWKswkKKlF5YygG2cVC4wDN+ W10tZkn4eBYfOYnEV7p2+AeshK7uY7tuZSTKf5m8KqGoEgrhyyYMUsioxaUtw11zjMdH 8ppA== X-Gm-Message-State: ACgBeo1mQNpSXGeSpYcNMDl8iG7SEI+lU263Q9PsjbmFI3r6n3VVgqEK AYnpmJrgNjl1swHFnTAWkCQ/08oJib6WKJiOeqo= X-Google-Smtp-Source: AA6agR5F+DtcdWSi8oaz9CrC8BdWgX6PpVlr6IRyqTsyA8j/NEVrE/6SxYmhUpOS2z/u92nNJZf/ecpsw0CAsgWvtH4= X-Received: by 2002:a05:6102:2387:b0:34b:9f6d:10da with SMTP id v7-20020a056102238700b0034b9f6d10damr1803344vsr.28.1660847257720; Thu, 18 Aug 2022 11:27:37 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Thu, 18 Aug 2022 11:27:37 -0700 From: Stefan Kangas In-Reply-To: <4be32abc-412e-2d2d-aa4c-c245536c0d4d@gmx.at> (martin rudalics's message of "Sat, 11 Apr 2020 10:32:37 +0200") References: <4be32abc-412e-2d2d-aa4c-c245536c0d4d@gmx.at> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) X-Hashcash: 1:20:220818:andreas.matthias@gmail.com::5gbfZHdgXoiyBaPB:F/SZ MIME-Version: 1.0 Date: Thu, 18 Aug 2022 11:27:37 -0700 Message-ID: Subject: Re: bug#40513: Tooltips with images To: martin rudalics Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 40513 Cc: 40513@debbugs.gnu.org, Andreas Matthias X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 40513 + wontfix close 40513 thanks martin rudalics writes: > In either case, I don't think that all this should be of any importance > for you: If you want to show an image in a tooltip, you will have to use > the native Emacs tooltip anyway, so set 'x-gtk-use-system-tooltips' to > nil and you are done. If you insist on using GTK tooltips (something I > recommend only to hardcore GTK fans) you will have to live with the fact > that sometimes a native Emacs tooltip will pop up in case GTK has not > caught up with initializing the tooltip data for a new frame. No further comments within over 2 years. From reading the bug report and Martin's reply, it sounds like we are okay with the way things are currently. I'm therefore closing this bug report. If this conclusion is incorrect and this is still an issue, please reply to this email (use "Reply to all" in your email client) and we can reopen the bug report. From unknown Fri Sep 12 00:24:50 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 16 Sep 2022 11:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator