[Xcb] Setting _NET_WM_STATE_FULLSCREEN
vtorri at univ-evry.fr
Fri Dec 31 23:51:01 PST 2010
On Fri, 31 Dec 2010, Cinolt wrote:
> Ah, thanks. The wording of it got me thrown off. One way I have found that
> works to actually remove decorationsis the _MOTIF_WM_HINTS property, and it
> uses the following structure in the data argument of xcb_change_property:
> uint32_t flags;
> uint32_t functions;
> uint32_t decorations;
> int32_t inputMode;
> uint32_t status;
> } Hints;
> Kind of off topic but is there any official XCB structure for this yet?
No. In util, there is a ICCCM utility library in the 'util' package. Iirc,
Arnaud wrote a EWMH utility library but it is not in the 'util' (yet ?).
So Maybe such MWM structure should go to that 'util' package.
> On Fri, Dec 31, 2010 at 8:41 PM, Vincent Torri <vtorri at univ-evry.fr> wrote:
>> 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
>>> to have the _NET_WM_STATE_FULLSCREEN atom (
>>> http://standards.freedesktop.org/wm-spec/wm-spec-1.3.html#id2507241 ).
>>> should I do this in XCB? This is my failed attempt, it appears as a
>> 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,
>>> 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,
>>> 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,
>>> I can set other properties such as the window name, so the other
>>> code should be fine. Thanks in advance.
More information about the Xcb