After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 586571 - wnck_application_get_icon_is_fallback always returns FALSE
wnck_application_get_icon_is_fallback always returns FALSE
Status: RESOLVED FIXED
Product: libwnck
Classification: Core
Component: general
2.26.x
Other All
: Normal normal
: ---
Assigned To: libwnck maintainers
libwnck maintainers
Depends on:
Blocks:
 
 
Reported: 2009-06-21 21:00 UTC by Michael Trausch
Modified: 2009-06-22 08:40 UTC
See Also:
GNOME target: ---
GNOME version: 2.25/2.26



Description Michael Trausch 2009-06-21 21:00:34 UTC
Please describe the problem:
AllTray (an application that I am now the maintainer/developer for) uses libwnck to get icon information for application software that it attaches to.  It uses the application get icon and window get icon functionality to try to display an accurate icon in the task bar at any given time.

What AllTray wants to do is:

  1. See if the icon we get from a WnckApplication is a fallback icon,
     a. If so, use the first window we find.
     b. If not, use the application icon.
  2. Subscribe to the application (or window) icon for changes so we update
     appropriately.

However, even when using a default icon, wnck_application_get_icon_is_fallback always returns FALSE, so we never get to (1)(a).

Steps to reproduce:
The problem can be reproduced 100% of the time.  I do not (at this time) have an absolute minimal test case; however, I do have an easy one.  To follow this set of instructions exactly, you will need to have Xlib, glib, gobject, gtop, wnck, and gtk libs and headers installed.

1.  Download, extract, and build the AllTray sources (with tests) for this bug:

  curl http://alltray.trausch.us/tests/alltray-0.7.3dev+.tar.gz | tar xz
  cd alltray-0.7.3dev+
  ./configure && make

2.  Run the test in tests:

  cd tests
  ../src/alltray ./GtkIconChange

3.  Click the button and note that the window icon in the task bar and the window decoration changes, but the icon does not in the notification area.

Actual results:
wnck receives a default application icon, but tells AllTray that it's not a fallback, when in fact it is.  This breaks AllTray's behavior (in an æsthetic sense, anyway) due to not knowing to look for a window icon.

Expected results:
wnck should return TRUE when using a fallback icon.

Does this happen every time?
Yes.

Other information:
I went to #gnome, where I was prompted to send email to Vincent Untz, who directed me to file a bug report here.  He also emailed me a patch for libwnck (which I tested and appears to fix this issue for me) but I am not attaching it because I don't know if Vincent would like to make any changes to it or anything before putting it up here or in git.
Comment 1 Vincent Untz 2009-06-22 08:40:17 UTC
Thanks, I pushed the patch to git :-)