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 142569 - displays wrong icon with multiple windows of same type icon change
displays wrong icon with multiple windows of same type icon change
Status: RESOLVED FIXED
Product: libwnck
Classification: Core
Component: tasklist
unspecified
Other Linux
: High trivial
: 2.10.x
Assigned To: libwnck maintainers
libwnck maintainers
: 140865 161715 167873 167880 (view as bug list)
Depends on:
Blocks: 155904
 
 
Reported: 2004-05-15 03:33 UTC by Sean Proctor
Modified: 2005-05-28 18:27 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch solving this problem (481 bytes, patch)
2005-03-01 22:13 UTC, Jaap A. Haitsma
accepted-commit_now Details | Review

Description Sean Proctor 2004-05-15 03:33:58 UTC
open enough windows of the same type, so that they group together. open one more
just so they stay grouped together. now, preferably each window has a different
icon, such as gaim. close the window with the icon matching the one shown in the
window list applet. the window list applet will keep that icon even though now
windows are now open with that icon.
Comment 1 Elijah Newren 2004-10-17 22:33:00 UTC
*** Bug 140865 has been marked as a duplicate of this bug. ***
Comment 2 Vincent Untz 2004-12-19 17:51:04 UTC
*** Bug 161715 has been marked as a duplicate of this bug. ***
Comment 3 Vincent Noel 2005-01-28 14:53:13 UTC
Moving to the right component. Sorry for the spam.
Comment 4 Elijah Newren 2005-02-20 01:37:02 UTC
*** Bug 167880 has been marked as a duplicate of this bug. ***
Comment 5 Elijah Newren 2005-02-20 01:38:28 UTC
Here's another testcase showing a slightly different angle for this bug (taken
from bug 167880):

1. Have grouping enabled in the panel window list.
2. Start GIMP
3. Open a number of images

When the open dialog is shown the icon in the window list to an icon of one of
the images i.s.o. of the gimp icon. As soon as the file is loaded it changes
back to the GIMP icon. However if you hit cancel the image icon remains in the
window list
Comment 6 Jaap A. Haitsma 2005-02-20 16:01:21 UTC
*** Bug 167873 has been marked as a duplicate of this bug. ***
Comment 7 Jaap A. Haitsma 2005-02-20 16:02:31 UTC
from bug 167873 another test case

1. Set the window list to group similar windows
2. Open nautilus for your home directory
3. Open another nautilus window by e.g. opening a subdir in your home dir
4. Open the trash. (Now you will see that the window list icon changes to trash)
5. select the window opened in step 2 or 3
6. Close the trash window
7. The icon in the window list keeps on being the trash icon

I would expect that it would change to one of the icons of either the home dir
or the subdir.

NOTE If you close one of the other icons the trash icon dissapears.
NOTE It also happens if you i.s.o. trash use one of the other icons which has a
custom icon such as computer or burn:///
Comment 8 Jaap A. Haitsma 2005-02-20 16:06:59 UTC
Wouldn't the best solution to this problem be to define an icon which is a kind
of group leader??
Comment 9 Jaap A. Haitsma 2005-03-01 22:13:40 UTC
Created attachment 38128 [details] [review]
Patch solving this problem

The above patch solves the original problem of Sean Proctor and also the
problem I'm stating about nautilus.

The patch just determines a new group leader when a window gets removed.

libwnck uses some heuristics to obtain the group leader/application icon.
Wouldn't be the best solution to introduce a new API call in GTK along the
lines of gtk_set_application_icon(...) (There is already a 
g_set_application_name (...) in glib). libwnck does not need to use any
heuristics then for obtaining the icon. If so where should a request for this
be filed.

Or is it somehow possible for libwnck possible to obtain the icon that is set
by gtk_window_set_default_icon?
Comment 10 Jaap A. Haitsma 2005-03-14 22:34:52 UTC
ping
Comment 11 Elijah Newren 2005-03-15 20:50:07 UTC
Sorry, I'll try to take a look at this soon.  I've, uh, been busy making it
easier for people to do patch review so that we can try to help people getting
their act together in reviewing patches (see
http://mail.gnome.org/archives/desktop-devel-list/2005-March/msg00128.html and
in particular bug 141386).  Oh, the irony...  :)

Making some changes to make sure we don't forget this bug.
Comment 12 Elijah Newren 2005-03-22 19:01:32 UTC
Patch looks fairly obvious and sensible to me.

As far as your questions in comment 9 about having a better way than the current
heuristics for  determining the group icon (i.e. having an application specify
it), that's probably a question better answered by Havoc or Mark.  I'm not that
familiar with gtk_set_application_icon() and g_set_application_name() and such...
Comment 13 Havoc Pennington 2005-03-22 19:28:20 UTC
I would suggest making gtk_window_set_default_icon() set the icon on the group
leader window. In fact I would have thought it did that already, but looking at
the code quickly I don't see it.
Comment 14 Kjartan Maraas 2005-05-16 22:56:40 UTC
Should this be commited? Has been accepted-commit_now for a long time.
Comment 15 Elijah Newren 2005-05-28 16:38:09 UTC
Yes, it should.  Jaap: Do you have a CVS account, or should I handle it?
Comment 16 Jaap A. Haitsma 2005-05-28 17:16:12 UTC
I don't have a cvs account. Please commit it for me. I guess we also file a bug
on the suggestion of Havoc of making gtk_window_set_default_icon() set the group
leader
Comment 17 Elijah Newren 2005-05-28 18:27:50 UTC
Committed, thanks!

2005-05-28  Elijah Newren  <newren@gmail.com>

	* libwnck/class-group.c (_wnck_class_group_remove_window): Patch
	from Jaap Haitsma to determine a new group leader when the
	previous one gets removed.  Fixes #142569.

I'll let you handle filing a bug for the gtk_window_set_default_icon thing.