Hyprland icon indicating copy to clipboard operation
Hyprland copied to clipboard

Pinned window cannot be made fullscreen without unpinning first

Open mcginty opened this issue 2 years ago • 10 comments

This is at least true with mpv: if I'm playing a video that I've made floating, I can fullscreen. However, if I then pin it and try to fullscreen it won't work until I unpin it first.

It seems like it should be possible to fullscreen while pinned.

Thanks for making Hyprland!

mcginty avatar Dec 02 '22 04:12 mcginty

intentional design.

Fullscreening a pinned window would have to remove its pinned status. More intuitive to leave as is.

vaxerski avatar Dec 02 '22 08:12 vaxerski

Hi @vaxerski, there are a couple downsides with leaving it as it is that I wanted to share with you:

  • the native app's bindings to toggle fullscreen status (mpv's f, in this case) "suddenly" don't work if window is pinned
  • it isn't possible to make a hyprland keybinding that would just toggle fullscreen status of floating pinned window

For the latter, instead of pin dispatcher which currently toggles pinned status, we'd have to do something like:

bind SUPER, f, pin, disable (not toggle, always disable)
bind SUPER, f, fullscreen
bind SUPER, f, pin, enable

And use this binding (also for non-floating windows, which feels a bit weird, but I wouldn't want to have two separate shortcuts to toggle fullscreen). This idea also assumes, that I want all floating windows to be pinned, which might not be the case (I could personally live with it).

Maybe Hyprland could do this logic internally on fullscreen dispatcher? But to make it proper, it'd have to keep a state of whether the app was pinned, before it enters fullscreen, and restore that status upon exit?

Coming from sway, I want also to share how sway does this: it simply doesn't remove the pinned state from the fullscreen window! In other words, if you are on a workspace 1, you fullscreen a pinned window, press binding to go to workspace 2, you still see the fullscreen video, but when you unfullscreen it, you'll see that you are in fact on workspace 2 now.

maximbaz avatar Jan 10 '23 20:01 maximbaz

Coming from sway, I want also to share how sway does this: it simply doesn't remove the pinned state from the fullscreen window! In other words, if you are on a workspace 1, you fullscreen a pinned window, press binding to go to workspace 2, you still see the fullscreen video, but when you unfullscreen it, you'll see that you are in fact on workspace 2 now.

nope it's definitely not gonna work like that.

I can make it remove the pin status, but definitely not this.

Pinning a fullscreen window is not allowed.

vaxerski avatar Jan 10 '23 21:01 vaxerski

Personally I agree 😁 sway's method has weird consequences, such as keyboard focus can get stolen after moving to another workspace, and the fullscreen window becoming unfocused. I like your idea a lot better, it's both intuitive and still usable with one shortcut (Hyprland's or mpv's) - press f on a floating pinned mpv, and it gets unpinned and fullscreen, press f again and it's back floating and pinned as it was before 👍

maximbaz avatar Jan 10 '23 22:01 maximbaz

nope it's definitely not gonna work like that.

is there a specific reason for this like maybe security, could it not even be togglable or something?

Im mainly on a laptop so the closest I could get to a multi monitor setup is having a pinned floater (usually media like a pip or mpv) which I would occasionally fullscreen/maximize. The wm is perfect for me and implementing it in my environment was pretty smooth, except for small issues, most of which were fixed, but this seems like its never going to be implemented by design. Is there perhaps a good workaround or maybe plans of 'unpin to fullscreen'? unfloating already unpins by default so it would be good to have for consistency. its also weird that tiled pinning is not possible.

ymnejmi avatar Sep 29 '23 05:09 ymnejmi

i was thinking that this problem can be easily fixed the same way hyprland does different opacity levels for fullscreen and non fullscreen state, but it is actually separate opacity values and special logic for it codelink

    static auto PINACTIVEALPHA          = CConfigValue<Hyprlang::FLOAT>("decoration:inactive_opacity");
    static auto PACTIVEALPHA            = CConfigValue<Hyprlang::FLOAT>("decoration:active_opacity");
    static auto PFULLSCREENALPHA        = CConfigValue<Hyprlang::FLOAT>("decoration:fullscreen_opacity");

@vaxerski if we make a more generalized solution, with configurable set of properties that are separate for fullscreen/active/inactive it would be a solution for this issue, what do you think?

ivanbalashov239 avatar Mar 19 '24 00:03 ivanbalashov239

I dont understand

vaxerski avatar Mar 19 '24 02:03 vaxerski

Never mind, i read the code a bit more, and see that there are lots of special ifs and etc for logic of pinning and other window properties, that this kind of configurability might over complicate things.

what i meant, is, right now there are configuration vars for opacity level, separate for active/inactive/fullscreen. and i thought to suggest, that that logic could be generalazied for all window properties.

ivanbalashov239 avatar Mar 21 '24 21:03 ivanbalashov239

could be

vaxerski avatar Mar 22 '24 00:03 vaxerski

I agree that restoring the pinned state would be nice. Maybe restoring the status after unfloating and refloating would also be nice.

Root-Core avatar Apr 23 '24 00:04 Root-Core