From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Andreas Matthias Newsgroups: gmane.emacs.bugs Subject: bug#40513: Tooltips with images Date: Wed, 8 Apr 2020 22:49:48 +0200 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000c7ef9105a2cda426" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="26522"; mail-complaints-to="usenet@ciao.gmane.io" To: 40513@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Apr 08 22:51:17 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jMHfI-0006mN-EX for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 08 Apr 2020 22:51:16 +0200 Original-Received: from localhost ([::1]:40470 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jMHfH-0000pf-Fa for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 08 Apr 2020 16:51:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42329) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jMHf6-0000lr-HO for bug-gnu-emacs@gnu.org; Wed, 08 Apr 2020 16:51:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jMHf4-0005AA-Np for bug-gnu-emacs@gnu.org; Wed, 08 Apr 2020 16:51:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:41392) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jMHf4-0005A3-Iz for bug-gnu-emacs@gnu.org; Wed, 08 Apr 2020 16:51:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jMHf4-0000mN-Fs for bug-gnu-emacs@gnu.org; Wed, 08 Apr 2020 16:51:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Andreas Matthias Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 08 Apr 2020 20:51:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 40513 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.15863790082922 (code B ref -1); Wed, 08 Apr 2020 20:51:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 8 Apr 2020 20:50:08 +0000 Original-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 Original-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 Original-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 Original-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 Original-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 Original-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) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:178150 Archived-At: --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--