[waffle] [PATCH 07/10] waffle: add full screen window request

Frank Henigman fjhenigman at google.com
Thu Apr 16 08:34:20 PDT 2015


On Thu, Apr 9, 2015 at 6:48 PM, Chad Versace <chad.versace at intel.com> wrote:
> On Mon 30 Mar 2015, Frank Henigman wrote:
>>
>> You can now put WAFFLE_WINDOW_FULLSCREEN in the attribute list passed
>> to waffle_window_create2() and get a full screen window.
>> Only glx and x11_egl implemented so far.
>
>
> I like the idea of WAFFLE_WINDOW_FULLSCREEN. Comments below.

>> +    WAFFLE_WINDOW_FULLSCREEN                                    = 0x0312,
>
>
> wcore_enum_to_string must be taught about the new enum.

Done in v2 (sent separately).  Docs updated too.

>
>> +    if (!wcore_attrib_list_get(attrib_list_filtered,
>> +                               WAFFLE_WINDOW_FULLSCREEN, &unused)) {
>
>
> Instead of ignoring the value of WAFFLE_WINDOW_FULLSCREEN, it should be a
> boolean value whose default value is false, like WAFFLE_CONTEXT_DEBUG.

done

> Non-X11 platforms will reject WAFFLE_WINDOW_FULLSCREEN with the error
> message
> "bad attribute 0x312", and the user has no way to dynamically query which
> Waffle platforms support fullscreen and which don't. I really wish Waffle
> had
> an API for capability queries. But since it doesn't, users will just need to
> know
> when it's safe and when it isn't to request fullscreen.

I decided to put all the attribute parsing/checking in
waffle_window_create2() to avoid duplication in the platforms, and now
just pass -1x-1 to the platform window create function to request full
screen.  If the platform doesn't handle that it sets the error and
since it no longer sees the full screen attribute, "bad attribute"
seems wrong.  I changed it to WAFFLE_ERROR_UNSUPPORTED_ON_PLATFORM.

On the topic of queries, I'd like to be able to query a window after
creation, particularly to get the size that resulted from a full
screen request, but other queries might be useful too.  How about
analogues to eglQueryContext and eglQuerySurface?


More information about the waffle mailing list