mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-08-08 06:28:27 -04:00
refactor(compositor): reduce unnecessary UI updates
- Defer updates when window state hasn't actually changed - Cache frame-blocked state per screen instead of recalculating constantly - keep popouts cache so reopening them is instant & clean up otherwise
This commit is contained in:
@@ -38,6 +38,7 @@ Item {
|
||||
property bool contentHandlesKeys: false
|
||||
property bool fullHeightSurface: false
|
||||
property bool _primeContent: false
|
||||
property bool _contentWarm: false
|
||||
property bool _resizeActive: false
|
||||
property real _chromeAnimTravelX: 1
|
||||
property real _chromeAnimTravelY: 1
|
||||
@@ -472,6 +473,7 @@ Item {
|
||||
isClosing = false;
|
||||
animationsEnabled = false;
|
||||
_primeContent = true;
|
||||
_contentWarm = true;
|
||||
_supersededClose = false;
|
||||
|
||||
const screenChanged = _lastOpenedScreen !== null && _lastOpenedScreen !== screen;
|
||||
@@ -1334,7 +1336,8 @@ Item {
|
||||
Loader {
|
||||
id: contentLoader
|
||||
anchors.fill: parent
|
||||
active: root._primeContent || shouldBeVisible || contentWindow.visible
|
||||
// _contentWarm keeps the tree loaded across close for fast re-open; reclaimed by PopoutService on lock/idle.
|
||||
active: root._primeContent || shouldBeVisible || contentWindow.visible || root._contentWarm
|
||||
asynchronous: false
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user