Hyprland icon indicating copy to clipboard operation
Hyprland copied to clipboard

Fullscreen in window only

Open jiiiijiij opened this issue 2 years ago • 6 comments

A config option to force all apps on workspace to go fullscreen inside the window. Then the user will decided which app their want to really fullscreen. I only see option to rule specific app to use fullscreen. Example is this youtube fullscreen. jjjj

jiiiijiij avatar Oct 18 '22 11:10 jiiiijiij

what? In english please, I don't understand

vaxerski avatar Oct 18 '22 11:10 vaxerski

He might have meant fakefullscreen type of thing, idk.

It's like fullscreen 0, the app goes full screen mode (e.g. chromium will hide tabs etc), but it is contained within its own window and the window itself doesn't go full screen. You can then switch to monocle layout (actual full screen regardless of app's state, like fullscreen 1), if you want, but those are 2 separate actions.

MahouShoujoMivutilde avatar Oct 18 '22 13:10 MahouShoujoMivutilde

oh ok

vaxerski avatar Oct 18 '22 14:10 vaxerski

i currently achieve this with youtube for example by opening the youtube vid in regular fullscreen mode then move it to another workspace that has applications currently in it and it works fine and keeps the youtube video in fakefullscreen or whatever you want to call it 2022-10-18-11:40:12

umop3plsdn avatar Oct 18 '22 15:10 umop3plsdn

cool youtuber you watching there

vaxerski avatar Oct 18 '22 16:10 vaxerski

@jiiiijiij I opened an issue with the same wish before (which was rejected). Your browser might have the option to limit fullscreen to the browser window. I use qutebrowser the option there is called "content.fullscreen.window". For chrome the add-on fullscreen-anything might help. @vaxerski I still think this would be a nice addition to hyprland.

Dickby avatar Oct 18 '22 16:10 Dickby

I really like this suggestion and I think it improves productiveness, plus one of the reasons I use Hyprland or tiling window managers in general, is because I want to have full control over my windows and how they are positioned. IMO the more control the user/window manager has, the better (also for productivity).

The example mentioned before of wanting to stream a youtube video full screen without it actually covering the entire screen is something I often did before when using XMonad. Back there in Xorg, I just removed the code that listened for the fullscreen request using the _NET_WM_STATE protocol. So the window would think it went fullscreen, but actually it was still tiled and controlled in its cute little space my window manager made for it.

I think that more window control is something that improves productivity and would therefore very much appreciate such a feature.

That being said, I think there's a ton on the todo list already xd Thanks for all the hard work you're putting in developing Hyprland. It's been my daily driver for a while now and it's absolutely awesome.

H0yVoy avatar Dec 22 '22 14:12 H0yVoy

added in cb4f7482269664dd20c373eef5d862a770df1643

vaxerski avatar Jan 01 '23 15:01 vaxerski

Thx for picking it up so quickly!

Could you elaborate on the expected behavior of this? I observe the following: fullscreen keybinding:

  • any window toggles fullscreen, covers all other windows

fakefullscreen keybinding:

  • no effect on some windows; e.g. foot terminal (probably doesn't have a fullscreen function)
  • identical to fullscreen keybinding on other windows e.g. firefox toggles fullscreen, covers all other windows

From the thread above I would expect firefox in the second case to 'go fullscreen' without covering other windows.

Am I doing something wrong here? Or did I misinterpret something?

H0yVoy avatar Jan 01 '23 18:01 H0yVoy

only tested chrome and it seemed to work.

vaxerski avatar Jan 01 '23 19:01 vaxerski

This doesn't seem to be working for me either. Triggerring the fakefullscreen dispatcher while having chromium focused doesn't seem to have any effect at all, same as doing so in alacritty terminal. However triggering it on firefox seems to actually make firefox go fullscreen, which hyprland picks up and fullscreens the window normally, covering everything else.

Also, I've noticed that there's no IPC event sent out once fakefullscreen is ran, and when I ran it on chrome or alacritty, no events were sent out at all. When running on firefox, regular fullscreen>>1 was sent. Am I doing something wrong?

(This is what I have in settings: bind = CTRL, Space, fakefullscreen,)

ItsDrike avatar Jan 05 '23 23:01 ItsDrike

chromium in wayland works perfectly fine.

As for firefox, yeah it seems to send its own events, will see what I can do bout those.

vaxerski avatar Jan 05 '23 23:01 vaxerski

chromium in wayland works perfectly fine.

Indeed, it does. I was running chromium over XWayland though, and that's when I've seen the issue.

ItsDrike avatar Jan 06 '23 01:01 ItsDrike

for the love of god dont

vaxerski avatar Jan 06 '23 12:01 vaxerski

Yeah, that's fair. But still, it should work on apps running through XWayland in general.

ItsDrike avatar Jan 06 '23 12:01 ItsDrike

fixed in 461fab0f27e4913993c6321625b343537aba1bdf

one thing that I noticed is that firefox will use the monitor's size in fullscreen (in some cases, for some reason) regardless of the window size, so fullscreen content may be cropped. (e.g. youtube videos)

vaxerski avatar Jan 06 '23 12:01 vaxerski

windows will now not be allowed to change their fullscreen state if fakefullscreen is active for them. only you can with a manual keybind.

vaxerski avatar Jan 06 '23 12:01 vaxerski

one thing that I noticed is that firefox will use the monitor's size in fullscreen (in some cases, for some reason) regardless of the window size, so fullscreen content may be cropped. (e.g. youtube videos)

This is actually the same behavior that i had on xmonad, but the other way around for some reason (chromium was getting cropped, firefox was not), and the same (hacky) fix works in hyprland: resize window one pixel and back again in an event hook. https://xmonad.github.io/xmonad-docs/xmonad-contrib/XMonad-Util-Hacks.html https://xmonad.github.io/xmonad-docs/xmonad-contrib/src/XMonad.Util.Hacks.html#windowedFullscreenFixEventHook

windows will now not be allowed to change their fullscreen state if fakefullscreen is active for them. only you can with a manual keybind.

And this is preventing me implementing the same hack for hyprland with a socket2 script.

Speaking of scripting, i have questions on now to implement this and other things, but they would get pretty long and off topic, so i'll create a discussion thread: #1503

Back to the fakefullscreen though, i've found that toggling it on an mpv window with --force-window=immediate isn't preventing it from going fullscreen. I don't know if this is a separate issue from #1375 or not, but seems like one.

nativerv avatar Feb 07 '23 02:02 nativerv