GNU bug report logs - #31884
26.1.50; Wrong icon in gtk tooltips

Previous Next

Package: emacs;

Reported by: Carlos Pita <carlosjosepita <at> gmail.com>

Date: Mon, 18 Jun 2018 18:25:02 UTC

Severity: minor

Tags: fixed, patch

Found in version 26.1.50

Fixed in version 27.1

Done: Noam Postavsky <npostavs <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 31884 in the body.
You can then email your comments to 31884 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#31884; Package emacs. (Mon, 18 Jun 2018 18:25:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Carlos Pita <carlosjosepita <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 18 Jun 2018 18:25:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Carlos Pita <carlosjosepita <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 26.1.50; Wrong icon in gtk tooltips
Date: Mon, 18 Jun 2018 15:24:17 -0300
[Message part 1 (text/plain, inline)]
In all tooltips I get the crossed circle icon (don't know its stock
name) at the left. I don't know if this is the intended behavior but it
surely looks weird and the icon is both confusing and
unnecessary. Please look at the attached screenshot.

[Screenshot from 2018-06-18 15-18-09.png (image/png, attachment)]
[Message part 3 (text/plain, inline)]
---

In GNU Emacs 26.1.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.30)
 of 2018-06-09 built on carlos
Repository revision: 3434edc731e4602891a9cf6418ec4e5ff2f60830
Windowing system distributor 'The X.Org Foundation', version 11.0.11906000
System Description:	Manjaro Linux

Recent messages:
Loading company (compiled; note, source file is newer)...done
Loading gnus...done
Loading ido...done
Loading ido-completing-read+...done
Loading paren...done
Loading winner...done
[yas] Prepared just-in-time loading of snippets successfully.
For information about GNU Emacs and the GNU system, type C-h C-a.

Configured using:
 'configure --prefix=/usr --libexecdir=/usr/lib --with-x-toolkit=gtk3
 --with-xft --with-modules 'CFLAGS=-march=x86-64 -mtune=generic -O2
 -pipe -fstack-protector-strong -fno-plt' CPPFLAGS=-D_FORTIFY_SOURCE=2
 LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now'

Configured features:
XPM JPEG TIFF GIF PNG RSVG SOUND GPM DBUS GSETTINGS NOTIFY ACL GNUTLS
LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11
MODULES THREADS LIBSYSTEMD LCMS2

Important settings:
  value of $LC_MONETARY: en_US.UTF-8
  value of $LC_NUMERIC: en_US.UTF-8
  value of $LC_TIME: en_US.UTF-8
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  display-line-numbers-mode: t
  flymake-mode: t
  diff-auto-refine-mode: t
  pyvenv-mode: t
  shell-dirtrack-mode: t
  winner-mode: t
  show-paren-mode: t
  ido-ubiquitous-mode: t
  ido-everywhere: t
  global-company-mode: t
  company-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-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
  column-number-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
rfc822 mml mml-sec epa derived epg mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail
display-line-numbers checkdoc flymake-proc flymake warnings
doom-themes-org vc-git cl-extra yasnippet elec-pair
highlight-indentation help-fns radix-tree help-mode elpy
find-file-in-project ivy delsel ivy-overlay ffap thingatpt windmove
diff-mode easy-mmode elpy-shell pyvenv esh-var esh-io esh-cmd esh-opt
esh-ext esh-proc esh-arg esh-groups eshell esh-module esh-mode esh-util
elpy-profile elpy-django elpy-refactor subr-x python tramp-sh tramp
tramp-compat tramp-loaddefs trampver ucs-normalize shell pcomplete
parse-time format-spec advice json map grep compile comint ansi-color
files-x company-oddmuse company-keywords company-etags etags xref
project company-gtags company-dabbrev-code company-dabbrev company-files
company-capf company-cmake company-xcode company-clang company-semantic
company-eclim company-template company-css company-nxml company-bbdb
doom-tomorrow-night-theme doom-themes doom-themes-common winner ring
paren ido-completing-read+ memoize s cus-edit minibuf-eldef ido gnus
nnheader gnus-util rmail rmail-loaddefs rfc2047 rfc2045 ietf-drums
mail-utils mm-util mail-prsvr wid-edit company edmacro kmacro pcase
cus-start cus-load finder-inf info package easymenu epg-config
url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs
eieio-loaddefs password-cache url-vars seq byte-opt gv bytecomp
byte-compile cconv cl-loaddefs cl-lib server time-date mule-util 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 menu-bar rfn-eshadow isearch timer
select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame 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 minibuffer 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 dbusbind inotify lcms2 dynamic-setting system-font-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty
make-network-process emacs)

Memory information:
((conses 16 399826 14914)
 (symbols 48 34718 2)
 (miscs 40 72 141)
 (strings 32 86093 3404)
 (string-bytes 1 2338503)
 (vectors 16 53837)
 (vector-slots 8 943294 14754)
 (floats 8 196 215)
 (intervals 56 299 0)
 (buffers 992 13))

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#31884; Package emacs. (Mon, 18 Jun 2018 19:09:02 GMT) Full text and rfc822 format available.

Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Carlos Pita <carlosjosepita <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: 26.1.50; Wrong icon in gtk tooltips
Date: Mon, 18 Jun 2018 16:08:17 -0300
Searching through the icon browser I would say that the icon in the
screenshot has stock name action-unavailable or
action-unavailable-symbolic. I grepped emacs code for these names and
couldn't find them, so I assume they're set by gtk on response to a
requested "unavailable action" (go figure). Now, the gtk code that
creates the tooltip seems to be replacing the original icon+label box
with just a custom label:

  0       g_object_set (G_OBJECT (widget), "has-tooltip", FALSE, NULL);
  1       x->ttip_widget = tooltip;
  2       g_object_ref (G_OBJECT (tooltip));
  3       x->ttip_lbl = gtk_label_new ("");
  4       g_object_ref (G_OBJECT (x->ttip_lbl));
  5       gtk_tooltip_set_custom (tooltip, x->ttip_lbl);
  6       x->ttip_window = GTK_WINDOW (gtk_widget_get_toplevel (x->ttip_lbl));

I'm unable to see here how an icon is being set at all.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#31884; Package emacs. (Tue, 19 Jun 2018 01:05:02 GMT) Full text and rfc822 format available.

Message #11 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Carlos Pita <carlosjosepita <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: 26.1.50; Wrong icon in gtk tooltips
Date: Mon, 18 Jun 2018 22:03:58 -0300
[Message part 1 (text/plain, inline)]
Tags: patch

This was a hard one to find...

The problem is in gtkutil.c xg_show_tooltip: gtk_widget_show_all makes
the icon that comes by default with a tooltip visible, which is
undesirable since that icon was never set. The fix is to simply use
gtk_widget_show.

Attached is a python script that reproduces the behavior, trying to
mimic the real emacs code. The first time you press the button show is
called and the tooltip has no icon, as expected. The second time
show_all is called and the missing icon problem manifests. If you keep
pressing the button show and show_all alternate, but the missing icon
is still there since it has been made visible forever by the first
show_all call.
[tooltip.py (text/x-python, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#31884; Package emacs. (Tue, 19 Jun 2018 01:16:01 GMT) Full text and rfc822 format available.

Message #14 received at 31884 <at> debbugs.gnu.org (full text, mbox):

From: Carlos Pita <carlosjosepita <at> gmail.com>
To: 31884 <at> debbugs.gnu.org
Date: Mon, 18 Jun 2018 22:15:19 -0300
Tags: patch




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#31884; Package emacs. (Tue, 19 Jun 2018 01:19:02 GMT) Full text and rfc822 format available.

Message #17 received at 31884 <at> debbugs.gnu.org (full text, mbox):

From: Carlos Pita <carlosjosepita <at> gmail.com>
To: 31884 <at> debbugs.gnu.org
Date: Mon, 18 Jun 2018 22:17:57 -0300
Tags: patch




Added tag(s) patch. Request was from Carlos Pita <carlosjosepita <at> gmail.com> to control <at> debbugs.gnu.org. (Tue, 19 Jun 2018 01:25:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#31884; Package emacs. (Wed, 20 Jun 2018 00:11:01 GMT) Full text and rfc822 format available.

Message #22 received at 31884 <at> debbugs.gnu.org (full text, mbox):

From: Noam Postavsky <npostavs <at> gmail.com>
To: Carlos Pita <carlosjosepita <at> gmail.com>
Cc: 31884 <at> debbugs.gnu.org
Subject: Re: bug#31884: 26.1.50; Wrong icon in gtk tooltips
Date: Tue, 19 Jun 2018 20:09:58 -0400
severity 31884 minor
quit

Carlos Pita <carlosjosepita <at> gmail.com> writes:

> Tags: patch

> Attached is a python script that reproduces the behavior,

That is sure to be useful, but I don't think it's a patch.  Did you mean
to post one?





Severity set to 'minor' from 'normal' Request was from Noam Postavsky <npostavs <at> gmail.com> to control <at> debbugs.gnu.org. (Wed, 20 Jun 2018 00:11:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#31884; Package emacs. (Wed, 20 Jun 2018 00:13:02 GMT) Full text and rfc822 format available.

Message #27 received at 31884 <at> debbugs.gnu.org (full text, mbox):

From: Carlos Pita <carlosjosepita <at> gmail.com>
To: Noam Postavsky <npostavs <at> gmail.com>
Cc: 31884 <at> debbugs.gnu.org
Subject: Re: bug#31884: 26.1.50; Wrong icon in gtk tooltips
Date: Tue, 19 Jun 2018 21:12:23 -0300
[Message part 1 (text/plain, inline)]
It's just that it was so easy that I described it in words: change
show_all to show :). But ok, here I'm attaching a proper patch.
[0001-Remove-broken-icon-from-tooltip.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#31884; Package emacs. (Wed, 20 Jun 2018 23:49:02 GMT) Full text and rfc822 format available.

Message #30 received at 31884 <at> debbugs.gnu.org (full text, mbox):

From: Noam Postavsky <npostavs <at> gmail.com>
To: Carlos Pita <carlosjosepita <at> gmail.com>
Cc: 31884 <at> debbugs.gnu.org
Subject: Re: bug#31884: 26.1.50; Wrong icon in gtk tooltips
Date: Wed, 20 Jun 2018 19:47:53 -0400
[Message part 1 (text/plain, inline)]
Carlos Pita <carlosjosepita <at> gmail.com> writes:

> It's just that it was so easy that I described it in words: change
> show_all to show :). But ok, here I'm attaching a proper patch.

> Subject: [PATCH 1/2] Remove broken icon from tooltip

Thanks, I checked it out on my gtk build; I don't have quite the same
icon you showed, but it looks like some kind of place holder that
shouldn't be there indeed.  The patch gets rid of it, so I guess it's
the right thing.

Have you done copyright assignment for Emacs?  Obviously, the patch is
too trivial to require it, but in case you haven't done it we should
mark the commit with "Copyright-paperwork-exempt: yes".

[cropped-icon-screenshot.png (image/png, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#31884; Package emacs. (Thu, 21 Jun 2018 00:19:02 GMT) Full text and rfc822 format available.

Message #33 received at 31884 <at> debbugs.gnu.org (full text, mbox):

From: Carlos Pita <carlosjosepita <at> gmail.com>
To: Noam Postavsky <npostavs <at> gmail.com>
Cc: 31884 <at> debbugs.gnu.org
Subject: Re: bug#31884: 26.1.50; Wrong icon in gtk tooltips
Date: Wed, 20 Jun 2018 21:18:00 -0300
[Message part 1 (text/plain, inline)]
>
>
> Thanks, I checked it out on my gtk build; I don't have quite the same
> icon you showed, but it looks like


Different stock icons for "missing icon" I guess.

some kind of place holder that
> shouldn't be there indeed


It's an icon gtk puts by default in a tooltip widget. Usually it's hidden
if you don't set it but show_all is exposing it. The attached python script
shows all this very clearly.
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#31884; Package emacs. (Fri, 22 Jun 2018 00:19:01 GMT) Full text and rfc822 format available.

Message #36 received at 31884 <at> debbugs.gnu.org (full text, mbox):

From: Noam Postavsky <npostavs <at> gmail.com>
To: Carlos Pita <carlosjosepita <at> gmail.com>
Cc: 31884 <at> debbugs.gnu.org
Subject: Re: bug#31884: 26.1.50; Wrong icon in gtk tooltips
Date: Thu, 21 Jun 2018 20:18:12 -0400
tags 31884 fixed
close 31884 27.1
quit

Carlos Pita <carlosjosepita <at> gmail.com> writes:

>  Thanks, I checked it out on my gtk build; I don't have quite the same
>  icon you showed, but it looks like 
>
> Different stock icons for "missing icon" I guess.

Yep, I pushed to master.

[1: 8a7475ca79]: 2018-06-21 19:57:59 -0400
  Remove broken icon from tooltip (Bug#31884)
  https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=8a7475ca796ecd5816fab9f11baf07bcc395d951




Added tag(s) fixed. Request was from Noam Postavsky <npostavs <at> gmail.com> to control <at> debbugs.gnu.org. (Fri, 22 Jun 2018 00:19:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 27.1, send any further explanations to 31884 <at> debbugs.gnu.org and Carlos Pita <carlosjosepita <at> gmail.com> Request was from Noam Postavsky <npostavs <at> gmail.com> to control <at> debbugs.gnu.org. (Fri, 22 Jun 2018 00:19:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 20 Jul 2018 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 6 years and 331 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.