Reserve more video memory for Xdummy
[notion/jeffpc.git] / ioncore / mwmhints.c
blobb3caec37910d92ad0725df7e66d2824749f3c720
1 /*
2 * ion/ioncore/mwmhints.c
4 * Copyright (c) Tuomo Valkonen 1999-2009.
6 * See the included file LICENSE for details.
7 */
9 #include "common.h"
10 #include "property.h"
11 #include "mwmhints.h"
12 #include "global.h"
15 WMwmHints *xwindow_get_mwmhints(Window win)
17 WMwmHints *hints=NULL;
18 int n;
20 n=xwindow_get_property(win, ioncore_g.atom_mwm_hints,
21 ioncore_g.atom_mwm_hints,
22 MWM_N_HINTS, FALSE, (uchar**)&hints);
24 if(n<MWM_N_HINTS && hints!=NULL){
25 XFree((void*)hints);
26 return NULL;
29 return hints;
33 void xwindow_check_mwmhints_nodecor(Window win, bool *nodecor)
35 WMwmHints *hints;
36 int n;
38 *nodecor=FALSE;
40 n=xwindow_get_property(win, ioncore_g.atom_mwm_hints,
41 ioncore_g.atom_mwm_hints,
42 MWM_N_HINTS, FALSE, (uchar**)&hints);
44 if(n<MWM_DECOR_NDX)
45 return;
47 if(hints->flags&MWM_HINTS_DECORATIONS &&
48 (hints->decorations&MWM_DECOR_ALL)==0){
49 *nodecor=TRUE;
51 if(hints->decorations&MWM_DECOR_BORDER ||
52 hints->decorations&MWM_DECOR_TITLE)
53 *nodecor=FALSE;
56 XFree((void*)hints);