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 68557 - gtk_window_set_default_icon_list should set icon hints on the leader window
gtk_window_set_default_icon_list should set icon hints on the leader window
Status: RESOLVED WONTFIX
Product: gtk+
Classification: Platform
Component: Widget: Other
1.3.x
Other Linux
: Normal normal
: Medium API
Assigned To: gtk-bugs
gtk-bugs
Depends on: 119375
Blocks:
 
 
Reported: 2002-01-12 02:40 UTC by Havoc Pennington
Modified: 2013-10-06 05:42 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Havoc Pennington 2002-01-12 02:40:40 UTC
Should set this icon on the leader window as the icon for the entire
application.

(Unfortunately, I don't think GDK exports a way to get the leader window 
anymore. Maybe we could do an internal "only GTK can use this" function. ;-))
Comment 1 Owen Taylor 2002-01-15 15:50:45 UTC
Is there something in the wm-spec saying that the icon on
the leader window is the icon for the app?
Comment 2 Matthias Clasen 2002-01-15 15:56:31 UTC
ICCCM, section 4.1.1: 

One of the windows (that is, the one the others point to) will be the 
group leader and will carry the group as opposed to the individual 
properties. Window managers may treat the group leader differently 
from other windows in the group. For example, group leaders may have 
the full set of decorations, and other group members may have a 
restricted set. 

Comment 3 Gregory Merchan 2002-02-16 21:25:08 UTC
Icons should still be set per window.
  ICCCM 4.1.2.4.  WM_HINTS Property
  ...
  Conventions:
  ...
       2.   The properties of the window group leader are
            those for the group as a whole (for example,
            the icon to be shown when the entire group is
            iconified).
  ...

Comment 4 Havoc Pennington 2002-02-17 06:47:39 UTC
> Icons should still be set per window.

Of course, that isn't the point. The point is to have an icon 
that is the icon for the whole application, so that e.g. 
a button representing the whole app in the tasklist can use it.

Comment 5 Matthias Clasen 2002-04-05 13:34:42 UTC
Move open bugs from milestones 2.0.[012] -- > 2.0.3, since 2.0.2 is already out.
Comment 6 Havoc Pennington 2002-12-08 15:58:07 UTC
I guess this is effectively an API bug, because 
we need the GDK API for GTK to use.

Number of dups on #77941 suggests we really should have remembered to 
do this for 2.2, but wasn't marked API. doh.
Comment 7 Matthias Clasen 2003-04-23 22:59:07 UTC
Hmm, I wonder what gdk api would be best here. First of all, I notice
that gdk merges the separate concepts of SM client leader and WM group
leader; its probably not a problem in practise since window groups are
so underused, but it is still conceivable to have a single SM client
which has multiple window groups. But this is a different problem.

So possible gdk apis:

a) GdkWindow *gdk_window_get_group (GdkWindow *window)

pro: nice symmetry with the the corresponding setter, but in practise,
most toplevels will always have the default leader (cf above), so maybe

b) GdkWindow *gdk_display_get_leader (GdkDisplay *display)

is more convenient. But both of these have problems when new displays
are opened after calling gtk_window_set_default_icon_list(). Who would
be responsible for setting the default icons on the leader of the
newly opened display ?

So maybe it would be best to go for

c) gdk_set_application_icon_list (GList *list)

in analogy to g_set_application_name()
which would have the disadvantage of storing a redundant copy of the
default icon list, but would to set the icon on the group window like
we do for the title with check_leader_window_title().
Comment 8 Havoc Pennington 2003-04-24 01:52:08 UTC
I have some sense that each GTK_WINDOW_TOPLEVEL should automatically 
be in its own group (at least by default). Or perhaps the right thing 
if we have a GnomeApp equivalent is for each GnomeApp-type window 
to be in its own group.

Or maybe we should just break down and have an explicit group API 
(whether to overload GtkWindowGroup seems to be the open question)
and do the above by default, but let it be overridden.

Comment 9 Owen Taylor 2003-08-07 21:10:20 UTC
GTK+ doesn't merge the concept of group leader and client 
leader. The current API's in the two areas are:

void          gdk_window_set_group       (GdkWindow       *window,
                                          GdkWindow       *leader);
void          gdk_set_sm_client_id       (const gchar *sm_client_id);

and they are completely unrelated. I discussed client IDs with
Havoc at some length pre-2.2, and we agreed that there is 
no reason to ever need more than a single client ID per process.

It's not hard to watch the list of currently open displays;
there is a signal on the singleton GdkDisplayManager.
Comment 10 Owen Taylor 2003-08-07 21:51:26 UTC
There should be a heirarchy of:

 gtk_window_set_default_icon_list ();
 gtk_window_group_set_icon_list ();
 gtk_window_set_icon_list ();

where each window group (including the default) gets the
iconlist from gtk_window_set_default_icon_list() unless
explicitely set.
Comment 11 Federico Mena Quintero 2004-01-13 21:56:26 UTC
Didn't Matthias add such functions some time ago?
Comment 12 Matthias Clasen 2004-01-13 22:07:04 UTC
No I just made a start by making the leader window available from gdk.
Comment 13 Matthias Clasen 2013-10-06 05:42:53 UTC
closing old bugs