Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ontop client bug #667

Closed
flyboy14 opened this issue Feb 5, 2016 · 7 comments
Closed

Ontop client bug #667

flyboy14 opened this issue Feb 5, 2016 · 7 comments

Comments

@flyboy14
Copy link

flyboy14 commented Feb 5, 2016

When I make an ontop client window fullscreen and then back to non-fullscreen state, it also appears not to be ontop anymore.

@psychon
Copy link
Member

psychon commented Feb 5, 2016

This is done on purpose:

awesome/objects/client.c

Lines 1112 to 1119 in cd63cab

/* become fullscreen! */
if(s)
{
/* You can only be part of one of the special layers. */
client_set_below(L, cidx, false);
client_set_above(L, cidx, false);
client_set_ontop(L, cidx, false);
}

Alternatively, we would have to define an arbitrary "stronger than" relation between these properties to decide which one is ignored when more than one is active.

@flyboy14
Copy link
Author

flyboy14 commented Feb 5, 2016

So, if I understood correctly, client couldn't be both fullscreen and ontop at the same time?

@psychon
Copy link
Member

psychon commented Feb 5, 2016

Yup.

Awesome thinks in layers. At the very top are "ontop" windows. Below that come "fullscreen" windows, then "above" windows. Then "normal", "below" and "desktop" (in this order). That's what the comment that I linked to above means with "a window cannot be in multiple layers at the same time". Put differently, a fullscreen client is automatically something like ontop. (However, we do allow clients with type "desktop" to be "ontop" and ignore their desktop property as long as they are ontop, so perhaps something similar could be done here... but would that make sense? I'm not sure)

And yet I also think that this bug report has a valid point (unexpected behaviour, but "it's a feature, not a bug" :-) ).

@blueyed
Copy link
Member

blueyed commented Mar 21, 2016

@psychon

define an arbitrary "stronger than" relation between these properties to decide which one is ignored when more than one is active

I'd vote for that..

@Elv13
Copy link
Member

Elv13 commented Mar 21, 2016

@blueyed Then we would be better to just implement z-index and emulate the current layers on top of that. Most WMs have those ontop/normal/above/below/desktop layer concepts. Also, I don't mind the current behavior, it work fine for me.

@rogorido
Copy link

@flyboy14 this is already closed, and this is only a workaround but it seems to work for me:

client.connect_signal("property::fullscreen",
              function(c)
             if c.class == "mpv" and c.fullscreen == false then
                c.ontop = true
             end
              end)

@blueyed
Copy link
Member

blueyed commented Dec 27, 2018

@rogorido
For this to work you need to be aware that a client should be ontop after all.

@Elv13

Most WMs have those ontop/normal/above/below/desktop layer concepts.

Sure. But this is about internal implementation, and a simple fix for this might really be to allow having "fullscreen = true" and "ontop = true" set at the same time, but then only use "ontop" for stacking.

Also, I don't mind the current behavior, it work fine for me.

Yes, it is not too bad, but it is really confusing that a "fullscreen" client gets not only tiled suddenly when setting ontop, but also that its fullscreen state is not restored/kept when unsetting "ontop".

I came across this via blueyed/awesome-cyclefocus#26: I am using "ontop = true" temporarily to ensure a client is visible when cycling, and this requires additional handling of the other related properties (fullscreen, above, and below) - not only for the current client, but also others (because you need to unset ontop for others to make fullscreen clients visible).

For reference, this is where the order is used:
https://github.com/blueyed/awesome/blob/57e05cda1c05eeb793973ff214713bf7d2ad48c5/stack.c#L125-L156

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants