Re: Support for WM spec



On 2 Mar 2001, Owen Taylor wrote:

> > I didn't combine the MODAL state with the window type hint, because
> > separating it fit better with the Gtk changes. All classes deriving from
> > GtkDialog get a DIALOG type, and all modal GtkWindows gets the MODAL
> > state.
>
> The implementation (though not the API, I think) of MODAL should
> probably be integrated in some way with what Havoc is working on.

Yes.

> > + * gdk_window_set_modal_hint:
> > + * @window: A #GdkWindow
> > + * @modal: TRUE if the window is modal, FALSE otherwise.
> > + *
> > + * The application can use this hint to tell the window manager
> > + * that a certain window has modal behaviour. The window manager
> > + * can use this information to handle modal windows in a special
> > + * way.
>
> It would be nice to have a ", such as..." here to clarify the
> behavior. but I'm not sure what that would be. I don't really
> understand the purpose of this hint in the wmspec.

Maybe things like keeping modal windows in from of the windows they're
modal for.

> > + * On the X11 backend this call might fail if the window manager
> > + * doesn't support the Extended Window Manager Hints. Then this
> > + * function returns FALSE, and the application should fall back
> > + * to #gdk_window_set_icon().
>
> This is rather peculiar compared to most of GTK+ and I almost think
> that the backend should take care of emulation in the case it
> failure.
>
> But perhaps you are right that leaving this to GtkWindow is better
> if there is significant variation on how the fallback should
> be handled.

I'm still not sure about this.
I checked in, but i will think a bit about where to put the emulation.

> (We perhaps should wrap the ICCCM ICON_SIZES property, though,
> if we want GtkWindow to be able to do an accurate fallback.)

Hmm? I though that the wm resized the icon window to its desired size and
the app just rendered on expose events.

> > Index: gtk/gtkmenu.c
> > ===================================================================
> > RCS file: /cvs/gnome/gtk+/gtk/gtkmenu.c,v
> > retrieving revision 1.54
> > diff -u -p -r1.54 gtkmenu.c
> > --- gtk/gtkmenu.c	2001/02/17 06:04:40	1.54
> > +++ gtk/gtkmenu.c	2001/02/23 15:02:02
> > @@ -246,6 +246,8 @@ gtk_menu_init (GtkMenu *menu)
> >  				   NULL);
> >    gtk_window_set_policy (GTK_WINDOW (menu->toplevel),
> >  			 FALSE, FALSE, TRUE);
> > +  gtk_window_set_type_hint (GTK_WINDOW (menu->toplevel),
> > +			    GDK_WINDOW_TYPE_HINT_MENU);
>
> No point in this menu->toplevel is override-redirect and will
> never be seen by the window manager.

Can you explain this a bit better? Should we use HINT_MENU on
menu->tearoff_window then?

 / Alex





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