]> git.mdlowis.com Git - proto/labwc.git/commit
view: stay fullscreen when view's output is disconnected
authorJohn Lindgren <john@jlindgren.net>
Fri, 2 Aug 2024 02:15:27 +0000 (22:15 -0400)
committerConsolatis <35009135+Consolatis@users.noreply.github.com>
Tue, 6 Aug 2024 17:00:47 +0000 (19:00 +0200)
commit0f6d5cc26a9d76954f995b82addfd5e9aac963b9
tree80416aea65b9b0ee5b2a5f119f9b2a556c0191a9
parentf14f006cbab6529db5b5c036b056cd6dcb7fec12
view: stay fullscreen when view's output is disconnected

I intended to fix this quite some time ago but didn't get around to it.

I don't think there's any good reason why we need to un-fullscreen a
view when its output is disconnected. We can handle it the same as a
maximized view, and move it to a new output (remaining fullscreen) or,
if all outputs are disconnected, just leave it as-is.

This is helpful for a media-center use-case, where you have just one
view (e.g. Kodi) fullscreen all the time, but the TV might appear to be
disconnected if you switch it to a different source.

Tested with a couple different scenarios:

1. Single output disconnected and re-connected: view stayed fullscreen.
2. Secondary output disconnected: view stayed fullscreen but moved to
   the primary output, and the layer-shell panel on that output was
   hidden as expected. When the secondary output was re-connected, the
   view was moved back (still fullscreen) and the panel on the primary
   appeared again.

Fixes: #864
src/view.c