Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maximized apps can't switch to fullscreen #6562

Closed
diniamo opened this issue Jun 17, 2024 · 11 comments · Fixed by #7104
Closed

Maximized apps can't switch to fullscreen #6562

diniamo opened this issue Jun 17, 2024 · 11 comments · Fixed by #7104
Labels
bug Something isn't working

Comments

@diniamo
Copy link
Contributor

diniamo commented Jun 17, 2024

Bug or Regression?

Bug

System Info and Version

System/Version info
Hyprland, built from branch  at commit 1360677478e867034713e5d43d7a8a8f6bf1343d  ().
Date: 2024-06-17
Tag: , commits: 1360677478e867034713e5d43d7a8a8f6bf1343d

flags: (if any)

Description

Maximized applications can't switch to the fullscreen state. I ran into this on Firefox/Youtube. Note that this not only doesn't work, but after the bug happens, the app won't be able to switch to fullscreen at all until I restart it.

How to reproduce

  1. Open a Youtube video in your browser
  2. Maximize it (fullscreen, 1 dispatcher)
  3. Press the fullscreen button in Youtube

Crash reports, logs, images, videos

showcase_encoded.mp4
@diniamo diniamo added the bug Something isn't working label Jun 17, 2024
@diniamo
Copy link
Contributor Author

diniamo commented Jun 17, 2024

Looks like this is a Firefox specific issue, works fine on Chromium.

@Meehir5907
Copy link

Well for me it doesn't work even on chromium:

fulscrerr.mp4

And for the firefox: I just need to enter fullscreen(Hyprland command) and then toggle out of it to non-maximized format and then the Full screen(Youtube) works normally

@diniamo
Copy link
Contributor Author

diniamo commented Jun 23, 2024

Oh, that might have happened for me too, except I don't have a bar, nor window decorations so it looked like actual fullscreen

@Steven--
Copy link

I've been running into this too. A workaround to recover Firefox from its broken state without restarting it is to fullscreen (not fake fullscreen) its window through Hyprland (usually a couple of times).

@sungyoonc
Copy link
Contributor

sungyoonc commented Jul 26, 2024

I've found the problematic code.

The fullscreen request is being ignored because the window is already in fullscreen(maximized).

if (fs != m_bIsFullscreen && m_bIsMapped)
g_pCompositor->setWindowFullscreen(m_pSelf.lock(), fs, FULLSCREEN_FULL);

g_pCompositor->setWindowFullscreen() doesn't get called because, fs(Requested fullscreen state) and m_bIsFullscreen(Current fullscreen state) is both true.

@diniamo
Copy link
Contributor Author

diniamo commented Jul 26, 2024

Then I'd say the change needs to be made in Hyprland, which is an outlier, because fullscreening a maximized window fullscreens it, instead of unmaximizing it in every desktop environment. This would also apply to keybinds, eg.: fullscreen, 1, followed by fullscreen, 0 would end up fullscreening.

@anna-s-h
Copy link

anna-s-h commented Jul 28, 2024

This bug was introduced sometime in June, and the design decision for fullscreen and maximized to behave like this has been around for a very long time. It's possible for this design to be stable, although I agree with you that it is a bad design decision

@diniamo
Copy link
Contributor Author

diniamo commented Jul 28, 2024

Technically, Hyprland doesn't have a stable release.

@ghost
Copy link

ghost commented Jul 29, 2024

Then I'd say the change needs to be made in Hyprland, which is an outlier, because fullscreening a maximized window fullscreens it, instead of unmaximizing it in every desktop environment. This would also apply to keybinds, eg.: fullscreen, 1, followed by fullscreen, 0 would end up fullscreening.

Question- I'm confused about what maximizing before fullscreening does that is different from just going straight to fullscreen? I tried to reproduce your issue in a few browsers, but wasn't able to. I couldn't tell a difference whether it was maximized first or not though, so maybe I'm missing something.

@diniamo
Copy link
Contributor Author

diniamo commented Jul 29, 2024

I'm not sure what your question is.

@diniamo
Copy link
Contributor Author

diniamo commented Jul 29, 2024

Inactive Bugzilla issue for reference: https://bugzilla.mozilla.org/show_bug.cgi?id=1727815

rsurasin added a commit to rsurasin/nixos-config that referenced this issue Nov 12, 2024
Some options renamed in configuration.nix. Also hyprland bug where you can't fullscreen on YouTube in Firefox or Firefox will break (hyprwm/Hyprland#6562)
rsurasin added a commit to rsurasin/nixos-config that referenced this issue Nov 12, 2024
…hanged

Also hyprland bug where you can't fullscreen on YouTube in Firefox or Firefox will break (hyprwm/Hyprland#6562)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants