Removing decorations from a window

Benedikt Meurer benedikt.meurer at unix-ag.uni-siegen.de
Mon Aug 22 22:28:27 CEST 2005


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));

Benedikt



More information about the Xfce mailing list