Bug 467032 - Consider not sending frame callbacks to occluded Windows
Summary: Consider not sending frame callbacks to occluded Windows
Status: REPORTED
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: unspecified
Platform: Other Other
: NOR wishlist
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-03-07 21:54 UTC by Emilio Cobos Álvarez (:emilio)
Modified: 2023-03-13 17:05 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.