Removing decorations from a window
Chris Green
chris at areti.co.uk
Mon Aug 22 22:51:06 CEST 2005
On Mon, Aug 22, 2005 at 10:28:27PM +0200, Benedikt Meurer wrote:
> Chris Green wrote:
> > On Mon, Aug 22, 2005 at 05:40:53PM +0200, Benedikt Meurer wrote:
> >
> >>>Well, I only know that for GTK there exists a function
> >>>gtk_window_set_decorated ();. I presume this function uses either motif
> >>>hints or hints from the EWMH specification defined on freedesktop.org.
> >>
> >>It's part of the MWM hints, which are supported by nearly every window
> >>manager today, and it's completely independent of Xlib, GTK+, etc. (i.e.
> >>XCB will do as well). It's simply a property on the window.
> >>
> >
> > OK, so can anyone tell me how I can get at this hint from Xlib
> > functions please.
>
> Quick and dirty:
>
> struct {
> unsigned long flags;
> unsigned long functions;
> unsigned long decorations;
> long input_mode;
> unsigned long status;
> } hints = {
> 2, 0, 0, 0, 0,
> };
>
> XChangeProperty (display, window,
> XInternAtom (display, "_MOTIF_WM_HINTS", False),
> XInternAtom (display, "_MOTIF_WM_HINTS", False),
> 32, PropModeReplace,
> (const unsigned char *) &hints,
> sizeof (hints) / sizeof (long));
>
Thank very much Benedikt! I can get from there to "long and cleaner",
it was just the initial bit I couldn't manage.
Using the MWM hints is fine as long as it works with most WMs.
--
Chris Green (chris at areti.co.uk)
"Never ascribe to malice that which can be explained by incompetence."
More information about the Xfce
mailing list