minimized and stick windows

Rafael Antognolli antognolli at gmail.com
Tue Jun 11 12:31:59 PDT 2013


On Thu, Jun 6, 2013 at 3:50 PM, Kristian Høgsberg <krh at bitplanet.net> wrote:
> On Tue, May 28, 2013 at 1:10 PM, Rafael Antognolli <antognolli at gmail.com> wrote:
>> On Thu, May 16, 2013 at 2:12 PM, Bill Spitzak <spitzak at gmail.com> wrote:
>>>
>>>
>>> Pekka Paalanen wrote:
>>>
>>>>> For example the floating shared toolbox with 2 main windows. It should
>>>>> only disappear when *both* main windows are minimized.
>>>>
>>>>
>>>> You very conventiently removed my next sentence, where I already took
>>>> this into account.
>>>> - pq
>>>
>>>
>>> Sorry, obviously I did not read very carefully:
>>>
>>>
>>>> Actually, if you think about a multi-window application, minimize needs to
>>>> work the same way, so that application can hide all relevant windows (but
>>>> maybe not *all* windows).
>>>
>>> I think also it is important to note that the compositor cannot even hide
>>> the window the minimize is for. This is because that hide should be in sync
>>> with the hiding of other windows, so the client should do all of them.
>>
>> OK, so since what Khristian proposed was this:
>>
>> https://github.com/antognolli/wayland/commit/a94eb97fdf49c6e06b0b4e94f4b8c840602442db
>>
>> Can I start from it? It seems to me that it allows to cover the most
>> important part mentioned here, which is the fact that weston will only
>> send the minimize events and clients should have control over this.
>
> Looks fine, putting some code behind all this talk would be very welcome.

Starting code here. Following are some comments.

https://github.com/antognolli/wayland/commits/minimize
https://github.com/antognolli/weston/commits/minimize

I didn't add code for the events that ask state changes from the
compositor, neither any code related to minimize yet. I tried to first
change the current maximized surface type to be just another state, as
suggested at some point in this thread.

So, it ended up very hackish IMHO. In order to do that, when the
surface type is set to maximized, I change it to set the maximized
state instead, which is currently working correctly (from my tests).
But when the surface type is set to anything else than maximized, I
have to unset the maximized state, to keep the same behavior as before
these changes.

I need to know if I should follow this path, in which case I'll
improve the above code (some refactory can take place), or if we
should use another approach. Maybe the minimized state should be in
fact another surface type, and we would only have states for things
like always_on_top and sticky (and any other that may come next). Or
maybe we can keep the same surface types that we had already, and just
add minimized as a state.

What are your opinions about this?

PS: I'm sending the code as links to github since it's not a request
to integrate it yet, but I can send it to the list as attached patches
if it's preferable.

PS2: I added the surface states as a bitmask, but since I didn't see
something like that in the rest of the code, I can also change it to a
simple enum.

Regards,
--
Rafael Antognolli


More information about the wayland-devel mailing list