Re: WM hints in Gnome 2

"Martin Craig" <m craig graffiti net> writes:
> How to make a window not appear on the taskbar
> (was gnome_win_hints_set_hints)

You have to use Xlib for this unless your window is of a semantic type
that normally skips taskbar, in which case you can use

> How to make a window appear above all others
> (was gnome_win_hints_set_layer)

There is no way to do this with the new standard WM spec that replaces
the old GNOME one.

If you set a semantic type on the window, though, it should get both
of the effects if they make sense for that semantic type. It sounds
like you might have a splashscreen? The CVS version of the spec
supports that.

gtk_window_set_type_hint() doesn't support all the type hints,
unfortunately, specifically not UTILITY and SPLASHSCREEN from the 
CVS copy of the spec; so you will need this Xlib code there too:

set_splashscreen_type (GdkWindow *window)
        Atom atoms[1] = { None };
        Atom net_wm_window_type;
        net_wm_window_type = XInternAtom (gdk_display, 
                                          "_NET_WM_WINDOW_TYPE", False);

        atoms[0] = XInternAtom (gdk_display, 

        XChangeProperty (GDK_WINDOW_XDISPLAY (window),
                         GDK_WINDOW_XWINDOW (window),
                         XA_ATOM, 32, PropModeReplace,
                         (guchar *)atoms, 1);

Do that on the "realize" signal for your window and it should work.

In a future version of GTK the missing semantic types will be added 
to gtk_window_set_type_hint().

If your window doesn't match one of the semantic types I'd be
interested to hear what kind of window it is.

> Also how to make a window 'sticky' - gtk_window_stick doesn't seem
> to work for me, is this a bug or am I missing something.

As it says in the gtk_window_stick() docs, it may not work with all
window managers, but GTK does as well as can be done to convince your
WM to do it. What WM do you have? (And what version?)


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