Re: WM hints interface




Marko Macek <Marko.Macek@snet.fri.uni-lj.si> writes:

> Owen Taylor wrote:
> > /* Any of icon_window, pixmap, or mask can be NULL */
> > void          gdk_window_set_icon        (GdkWindow       *window,
> >                                           GdkWindow       *icon_window,
> >                                           GdkPixmap       *pixmap,
> >                                           GdkBitmap       *mask);
> 
> I think this is not enough. The function should be able to accept
> multiple
> pixmap/mask arguments. The first one would be set as the default icon 
> (using standard arguments). The rest would be set as an additional 
> property (I proposed WIN_ICONS as an array of pixmap,mask handles).
> This is nonstandard, but I think most WMs currently in development
> would be able to make use of it quickly. Of course we would need to
> specify the recommended icons sizes.

This isn't a satisfactory solution until colormap/depth issues
are addressed. Matching the root window may be OK (the current
defacto standard for ICCCM-incompliant pixmaps), but it is
incompatible with the way gdk-imlib works now.
 
Another function can be added once something worked out.
(gdk_window_set_icons ?), but I wanted to get something in place right
now. A gdk_window_set_icons could even check WM_ICON_SIZES and
pick one out to use for the ICCCM icon.

> > void          gdk_window_set_icon_name   (GdkWindow       *window,
> >                                           gchar           *name);
> > void          gdk_window_set_group       (GdkWindow       *window,
> >                                           GdkWindow       *leader);
> > void          gdk_window_set_decorations (GdkWindow       *window,
> >                                           GdkWMDecoration  decorations);
> > void          gdk_window_set_functions   (GdkWindow       *window,
> >                                           GdkWMFunction    functions);
> > 
> > Which seems to cover most of the interesting things from the ICCCM
> > and Motif hints. I've split it up into separate pieces, figuring
> 
> Modal windows are missing (inputMode from motif). Or you could say
> that modal windows are banned from gtk (and I would agree ;-)

Modal windows aren't banned from GTK, but they are pretty much
supported without any WM functionality. The only real benefit
of WM support would being keeping the modal dialog on top
of the rest of the applications window.

I am quite against supporting the SYSTEM_MODAL feature of of MWM - the
user should be able to choose which application they want to 
interact with. Modal dialog hints could be added later, but I
didn't feel that they were either needed enough or standard enough
to put in now.
  
> > One thing that i haven't provided here is an interface to
> > XGetIconSizes. It seems to be pretty unimportant, since nobody
> > much sets the WM_ICON_SIZES in an interesting way.
> > (twm, fvwm, wm2, Enlightment don't set it. WindowMaker sets it
> > to "anything from 1x1 to 64x64 is OK") It could be added in
> > the future.
> 
> Icewm does. It sets it to 16x16 to 32x32 using 16x16 steps.

Tiny little icons.... Do most applications actually pay attention
and provide an icon that small?
 
> However, WM_ICON_SIZES does not allow to request an arbitrary set
> of icons sizes.
> 
> >  - An IconWindow widget needs to be created, since icon windows
> >    have a lot of constraints on them that Window widgets violate.
> 
> IconWindow icons are not very useful because you can only put them 
> in one place in the window manager (the desktop). What happens 
> if wm wants to put it in the menu or taskbar or something?

They can go any one place. Multiple places don't work - but 
that is only an issue for a few WM's. Having the support in GDK
certainly doesn't hurt anything. 

Regards,
                                        Owen



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]