[Xcb] Setting _NET_WM_STATE_FULLSCREEN

Vincent Torri vtorri at univ-evry.fr
Fri Dec 31 17:41:54 PST 2010



On Fri, 31 Dec 2010, Cinolt wrote:

> I want to create my window to fill the entire screen with no decorations.
> According to the EWMH specification, I should set the _NET_WM_STATE property
> to have the _NET_WM_STATE_FULLSCREEN atom (
> http://standards.freedesktop.org/wm-spec/wm-spec-1.3.html#id2507241 ). How
> should I do this in XCB? This is my failed attempt, it appears as a regular
> window:

The documentation says:

"_NET_WM_STATE_FULLSCREEN indicates that the window should fill the entire 
screen and have no window decorations. Additionally the Window Manager is 
responsible for restoring the original geometry after a switch from 
fullscreen back to normal window. For example, a presentation program 
would use this hint."

so that atom just **indicates** (to the Window manager) that your window 
is fullscreen (hence, for example (i think) the Window manager does not 
draw the border of the window). It's up to you to create a widnow of the 
size of the screen.

Vincent Torri

>
> ...
> xcb_connection_t* c = xcb_connect(0, 0);
> ...
> xcb_window_t w = xcb_generate_id(c);
> ...
> xcb_intern_atom_cookie_t cookie = xcb_intern_atom(c, 0, 12,
> "_NET_WM_STATE");
> xcb_intern_atom_reply_t* reply = xcb_intern_atom_reply(c, cookie, 0);
>
> xcb_intern_atom_cookie_t cookie2 = xcb_intern_atom(c, 0, 24,
> "_NET_WM_STATE_FULLSCREEN");
> xcb_intern_atom_reply_t* reply2 = xcb_intern_atom_reply(c, cookie2, 0);
>
> xcb_change_property(c, XCB_PROP_MODE_REPLACE, w, (*reply).atom, ATOM, 32, 1,
> &((reply2).atom);
> ...
>
> I can set other properties such as the window name, so the other irrelevant
> code should be fine. Thanks in advance.
>


More information about the Xcb mailing list