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

Attempt to make a video full-screen in Firefox is unreliable when window preference is set to "focus follows mouse" only with stock themes #670

Open
hedge00 opened this issue Jul 14, 2023 · 3 comments

Comments

@hedge00
Copy link

hedge00 commented Jul 14, 2023

I reported a what I thought was a Firefox bug to the Firefox Bugzilla the other day.

Problem description: In Firefox, the button to full-screen video (eg. YouTube) works unreliably.

They kicked it back as a Cinnamon problem. See: https://bugzilla.mozilla.org/show_bug.cgi?id=1843220

Expected behaviour: The video window expands to fill the screen.
Observed behaviour: The video momentarily expands, then immediately shrinks back to the normal size.
Screen recording of the problem

The problem only started in the last couple of days.

The problem is repeatable. It does not happen in another browser (Chromium).

Workarounds:

  • It clears when the browser window is placed in the upper left hand part of the screen.
  • It clears when "focus follows mouse" window behaviour is disabled.
  • It clears when the stock desktop theme is switched to one of the installable community-supplied themes (New-Minty).

Browser Console report, immediate after clicking:
20:27:49.395 Request for fullscreen was denied because requesting element is not in the currently focused tab. DOMFullscreenChild.sys.mjs:36:25
20:27:49.542
[Exception... "Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIDOMWindowUtils.addSheet]" nsresult: "0x80070057 (NS_ERROR_ILLEGAL_VALUE)" location: "JS frame :: resource://gre/modules/ExtensionCommon.sys.mjs :: runSafeSyncWithoutClone :: line 64" data: no] 2 ExtensionCommon.sys.mjs:64:12

The developers there believe that the behaviour is the result of bug in Cinnamon, quote:

What happens here is that the Fullscreen-ready check is done twice, one when requesting fullscreen here, and one when applying it.
The issue is that when focus follows mouse in cinnamon, somehow the window going fullscreen makes it lose focus at least temporarily (this seems like a cinnamon bug?), so the check fails the second time around.
Edgar, do we need to check for focus the second time (when applying fullscreen)? It seems a bit excessive since the focus can move for other reasons (even though this one is spurious and likely a bug in the DE?)
In any case, I'd report this to cinnamon because the spurious focus move only when focus follows mouse and only when using client-side decorations seems like a bug on their end.

System:
Kernel: 5.15.0-76-generic x86_64 bits: 64 compiler: gcc v: 11.3.0 Desktop: Cinnamon 5.6.8
tk: GTK 3.24.33 wm: muffin dm: LightDM Distro: Linux Mint 21.1 Vera base: Ubuntu 22.04 jammy
Full system info: system_information.txt

@mtwebster mtwebster transferred this issue from linuxmint/mint-themes Jul 14, 2023
@hedge00
Copy link
Author

hedge00 commented Jul 14, 2023

Retrospectively, the issue first appeared when the "Title Bar" checkbox was unchecked in Firefox's "Customize Toolbar" dialog.

@mtwebster mtwebster changed the title [X11/Cinnamon] Attempt to make a video full-screen in Firefox is unreliable when window preference is set to "focus follows mouse" only with stock themes Attempt to make a video full-screen in Firefox is unreliable when window preference is set to "focus follows mouse" only with stock themes Jul 15, 2023
@mtwebster
Copy link
Member

Thanks - I got notified about this from bugzilla, but couldn't log in to comment.

I can reproduce this in Cinnamon. Curiously, I was able to reproduce it with MATE also but not reliably and on every system I tried.

@mtwebster
Copy link
Member

There are a couple of temporary workaround I've discovered while investigating this:

  • Disable Effects->Resizing and tiling windows
    or
  • Enable the focus-change-on-pointer-rest option (this delays mouse focus changes until the pointer is at rest for 25ms or more):
gsettings set org.cinnamon.muffin focus-change-on-pointer-rest true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants