Sometimes I have a window in PiP, but I want to briefly check something that's under the window. I can move the window, look under it, and move it back, but that seems a bit manual.
We could either have the window go semi-transparent on hover to peek under, or could have a way to stash the window mostly off-screen. I'm in favor of the later but the former has been requested:
鈥emitransparency on mouseover would be really helpful. The Corner preview Gnome extension has that and it's very useful.
鈥揁janxkoci
Various PiP GNOME extensions have options for transparency on hover. iOS and Android have a way to "stash" PiP windows off the edge of the display.
I think the stashing would work too, if it's done well. The transparency was just something I've seen before.
I like the idea, you can play with the opacity levels on this branch: https://github.com/elementary/gala/pull/1176
@JoseExposito I think I prefer the "stash" idea over opacity, but I imagine that's much more complicated to implement. We might want to play with some mockups/sketches at least before getting too far into implementation.
We might want to play with some mockups/sketches at least before getting too far into implementation
Yes please, because I don't know what you mean by "stash". I guess you mean to move the window (almost) off the screen, but I'm not sure what event should trigger it.
Anyway, we can always evolve the implementation... Unless you really don't like making it semi-transparent, in that case feel free to close the PR.
I'm also not entirelly sure how the stashing works exactly. You mentioned Android - can you recommend any app that has this feature, so I can check it out, please? I know VLC has PIP, I'm not sure about the stashing though (and I don't use PIP on Android, at least not yet).
Edit: I think I recall that the PIP in Safari on MacOS was stashing in some situations, but I don't remember when exactly it was happening. Or maybe I confuse it with the "show desktop" feature of the OS? I used to use MacOS only for a few months at my internship last year...
Here's a quick recording on the Android 12 beta (it's still a bit buggy physics-wise):
https://user-images.githubusercontent.com/611168/124971709-c5446c80-dfe6-11eb-8a4d-d30089f1cbb0.mp4
The basic idea is that you can just push it mostly off-screen so that you can see or (importantly!) interact with something underneath it. The PiP window stays partially visible to give you a touch target to un-stash it. It's not a variable amount of stashing or anything, either; once you push it partially off-screen, it snaps into the stashed position, and once you pull it back on-screen, it snaps into the edge-attached position.
I think I like this approach better than transparency as it allows you to temporarily see and interact with something underneath the PiP window without moving it somewhere else that might be in your way, and it retains what may have been a carefully-considered positioned on screen when un-stashing.
That looks good. Btw note that
it retains what may have been a carefully-considered positioned on screen
also applies to (semi)transparency.
https://github.com/elementary/gala/pull/1176 is ready for UX and code review. I added a small demo.
@janxkoci you omitted the key part of that sentence:
it allows you to temporarily see and interact with something underneath the PiP window
Transparency of course retains the position while letting you see under it, but it does not let you interact with the screen underneath without moving the PiP window out of the way, losing the original position.