hyprwm / Hyprland

Hyprland is an independent, highly customizable, dynamic tiling Wayland compositor that doesn't sacrifice on its looks.
https://hyprland.org
BSD 3-Clause "New" or "Revised" License
19.61k stars 827 forks source link

Some games launch in floating mode instead of fullscreen #6568

Open TAforever opened 2 months ago

TAforever commented 2 months ago

Bug or Regression?

Regression

System Info and Version

System/Version info ```sh ```

Description

After updating to version 0.41, Hyprland began to ignore fullscreen requests from some games

https://github.com/hyprwm/Hyprland/assets/52626363/8385b632-791b-4876-8c0e-6086fae2dc18

How to reproduce

Just launch War Thunder (for example) on Steam

Crash reports, logs, images, videos

No response

zakk4223 commented 2 months ago

For me it only seems to do this on initial launch. If the game has an in-game option to switch between fullscreen/windowed, it seems to work when toggled.

TAforever commented 2 months ago

Of course it works if I press the shortcut to go to fullscreen but this should happen automatically, as it was in previous versions of Hyprland

nonetrix commented 2 months ago

For me it only seems to do this on initial launch. If the game has an in-game option to switch between fullscreen/windowed, it seems to work when toggled.

Same here

different-name commented 1 month ago

Also noticing this behaviour, perhaps its because the laucher is initially floating

MightyPlaza commented 1 month ago

can't you just set a window rule

different-name commented 1 month ago

can't you just set a window rule

No, it has no effect from what I've tried, possibly due to this:

Also noticing this behaviour, perhaps its because the laucher is initially floating

I've noticed it's impossible to tile the launchers for some games, and that they share the same class and title as the game window itself

MightyPlaza commented 1 month ago

can't you just set a window rule

No, it has no effect from what I've tried, possibly due to this:

Also noticing this behaviour, perhaps its because the laucher is initially floating

I've noticed it's impossible to tile the launchers for some games, and that they share the same class and title as the game window itself

that's impossible window doesn't have any say in fullscreen window rules, specially if the fullscreen and maximize events have been supressed what's the output of hyprctl clients and what window rule did you make?

different-name commented 1 month ago

What do you mean by fullscreen and maximise events being supressed?

MightyPlaza commented 1 month ago

windowrulev2=suppressevent maximize, class:^(firefox)$ for example to make sure the client isn't removing maximized state

different-name commented 1 month ago

Adding the suppressevent for maximize and fullscreen worked perfectly, thank you - I didn't realise those existed

@TAforever looks like the issue can be closed now

TAforever commented 1 month ago

There is such a thing as a fullscreen request that some programs request to automatically launch in fullscreen, and until version 0.41 Hyprland correctly processed these requests. I have one game that does not send fullscreen requests even to Windows and for it I made a fullscreen rule, but here the error is on Hyprland’s side. Specifically for the game War Thunder, hyprctl clients does not even give out the class name so that I can make a fullscreen rule

MightyPlaza commented 1 month ago

There is such a thing as a fullscreen request that some programs request to automatically launch in fullscreen, and until version 0.41 Hyprland correctly processed these requests.

true and probably should be fixed, however since it's on xwayland I'd expect it to have a lower priority

Specifically for the game War Thunder, hyprctl clients does not even give out the class name so that I can make a fullscreen rule

i think this is reported somewhere, but can't find it atm

different-name commented 1 month ago

You should perform a bisect https://wiki.hyprland.org/Crashes-and-Bugs/#bisecting-an-issue

MightyPlaza commented 1 month ago

You should perform a bisect https://wiki.hyprland.org/Crashes-and-Bugs/#bisecting-an-issue

it was likely the xwayland rewrite

TAforever commented 1 month ago

There is such a thing as a fullscreen request that some programs request to automatically launch in fullscreen, and until version 0.41 Hyprland correctly processed these requests.

true and probably should be fixed, however since it's on xwayland I'd expect it to have a lower priority

Specifically for the game War Thunder, hyprctl clients does not even give out the class name so that I can make a fullscreen rule

i think this is reported somewhere, but can't find it atm

Yes, I understand that a lot of work is being done now and my problem has a low priority

bubba-champion commented 3 weeks ago

The problem is still relevant and I will add that when switching to a workspace with another XWayland client and returning back to the game, the previously launched game that did not switch to fullscreen mode on startup goes into full screen mode.

MightyPlaza commented 3 weeks ago

The problem is still relevant and I will add that when switching to a workspace with another XWayland client and returning back to the game, the previously launched game that did not switch to fullscreen mode on startup goes into full screen mode.

supressevent window rule if you want to

TAforever commented 1 week ago

Guys, I think I've found a solution. It seems to me that the games still run in fullscreen, but the waybar remains visible. To avoid this, specify the bottom layer for the waybar in ~/.config/waybar/config.jsonc "layer": "bottom"

nonetrix commented 1 week ago

Uh, that isn't the issue I was having? I had Waybar appear above windows in some cases way before having this

zakk4223 commented 1 week ago

Guys, I think I've found a solution. It seems to me that the games still run in fullscreen, but the waybar remains visible. To avoid this, specify the bottom layer for the waybar in ~/.config/waybar/config.jsonc "layer": "bottom"

That is not a fix for this issue. It's just a workaround. You're changing the behavior of waybar to mask an actual bug. Also means if you actually want waybar above non-fullscreen windows you can no longer do that.

This weird fullscreen but not really issue started happening after the xwayland rewrite, so it is an actual bug that needs fixing.

TAforever commented 1 week ago

That is not a fix for this issue. It's just a workaround. You're changing the behavior of waybar to mask an actual bug. Also means if you actually want waybar above non-fullscreen windows you can no longer do that.

This weird fullscreen but not really issue started happening after the xwayland rewrite, so it is an actual bug that needs fixing.

Yes, you're right, I didn't need to close the issue, hyprctl activewindow shows that the game is not in fullscreen