Fullscreen WITHOUT window decoration
Glynn Clements
glynn at gclements.plus.com
Fri Sep 8 12:23:28 PDT 2006
Philip Pflästerer wrote:
> i want to develop a fullscreen application by using the xlib functions.
> Fullscreen means also NO window decoration. Normaly the window
> decoration is provided by the window manager. To ignore the window
> manager, i set the override_redirect flag to TRUE.
>
> XSetWindowAttributes setwinattr;
> setwinattr.override_redirect = True;
>
> XChangeWindowAttributes(display, win, valuemask, &setwinattr);
>
>
> This works fine so far, i have total control over the size, position an
> decoration (none) of the window. Unfortunatly, the window doesn't
> disappear when i change the focus to another window (for example by
> pressing ALT+TAB). It alway stays mapped on top, so I can't see the
> other windows or even the desktop. If I unmap the window manually,
> there's no way to get it back on screen because there's no entry in the
> task-bar. I guess these features are controlled by the window manager I
> set to be ignored with the code above.
>
> So my question is: How can I realize a fullscreen application WITHOUT
> ignoring the window manager?
You can ask the WM not to add any decorations using the following:
typedef struct {
CARD32 flags;
CARD32 functions;
CARD32 decorations;
INT32 input_mode;
CARD32 status;
} MotifWmHints, MwmHints;
#define MWM_HINTS_DECORATIONS (1L << 1)
...
Atom XA_MOTIF_WM_HINTS = XInternAtom(maindpy, "_MOTIF_WM_HINTS", False);
MotifWmHints mwm_hints;
mwm_hints.flags = MWM_HINTS_DECORATIONS;
mwm_hints.decorations = 0;
XChangeProperty(
maindpy, mainwin,
XA_MOTIF_WM_HINTS, XA_MOTIF_WM_HINTS,
32, PropModeReplace,
(char *) &mwm_hints, 5
);
--
Glynn Clements <glynn at gclements.plus.com>
More information about the xorg
mailing list