Bug 467032

Summary: Consider not sending frame callbacks to occluded Windows
Product: [Plasma] kwin Reporter: Emilio Cobos Álvarez (:emilio) <emilio>
Component: wayland-genericAssignee: KWin default assignee <kwin-bugs-null>
Status: REPORTED ---    
Severity: wishlist CC: nate
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Other   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Emilio Cobos Álvarez (:emilio) 2023-03-07 21:54:22 UTC
SUMMARY

Mutter does this, and this allows applications like Firefox to stop the compositor and throttle timers and animations.

STEPS TO REPRODUCE
1. In the foreground Firefox window, go to the terminal and write `setInterval(() => console.log(document.hidden), 500)`
2. Maximize a Konsole window on top of Firefox
3. Wait a bit.
4. Return to the Firefox console.

OBSERVED RESULT

Logs `false` every time.

EXPECTED RESULT

Logs true after a while while the window is occluded, then false again.
Comment 1 Emilio Cobos Álvarez (:emilio) 2023-03-07 22:37:15 UTC
I was under the impression that mutter tracked proper occlusion but it doesn't seem to work in my testing...
Comment 2 Emilio Cobos Álvarez (:emilio) 2023-03-07 22:50:58 UTC
Ah, it does work, but for some reason not with Konsole (is my Konsole using XWayland somehow? Or something else?).

Gedit, or another Firefox window, or Foot, seem to all work as described in comment 0.