[Xcb] Setting _NET_WM_STATE_FULLSCREEN

Cinolt cinolt.yk at gmail.com
Fri Dec 31 18:36:29 PST 2010


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:

struct
  {
    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?

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
>> 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.
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/xcb/attachments/20101231/25b608e7/attachment.html>


More information about the Xcb mailing list