smithay icon indicating copy to clipboard operation
smithay copied to clipboard

desktop/anvil: hide fullscreen window in space

Open cmeissl opened this issue 3 years ago • 5 comments

Fullscreen windows are handled special in anvil and do not use the space for rendering. But on a multi-output setup the window will get drawn on the other output with its current space location.

I propose a new property on the window that can be used to hide a window (per space?) on a space. This could be then used in anvil to hide the window on Fullscreen and unhide on UnFullscreen.

cmeissl avatar Jun 09 '22 10:06 cmeissl

Hmm, seems to me, that in this case the window should just be unmapped?

Drakulix avatar Jun 09 '22 14:06 Drakulix

This is also what I thought first, but just hiding it could have the advantage that the location is preserved. The idea behind a general "hide" funtionality is that some other things could also use it, like hiding the window timed (which I would need). But that can be implemented independently of the fullscreen unmap.

cmeissl avatar Jun 09 '22 15:06 cmeissl

I guess it could be useful, but it seems a lot like a fullscreened window should not be part of a Space conceptionally... But I guess we could add a Window::set_visible method. I would rather have the Window deal with this internally, than have the space special-case this behaviour. The window could easily report full damage on changing visibility, not return any surfaces for surface_under any more and skip drawing.

Drakulix avatar Jun 09 '22 15:06 Drakulix

So something like just ignoring draw calls and not return popups?

cmeissl avatar Jun 09 '22 15:06 cmeissl

So something like just ignoring draw calls and not return popups?

exactly

Drakulix avatar Jun 09 '22 15:06 Drakulix