mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-06-08 12:13:31 -04:00
popout: fix opening popouts across monitors
cc/brightness: fix delegate bindings and pinning
This commit is contained in:
@@ -357,14 +357,19 @@ Item {
|
||||
animationsEnabled = false;
|
||||
_primeContent = true;
|
||||
|
||||
if (_lastOpenedScreen !== null && _lastOpenedScreen !== screen) {
|
||||
const screenChanged = _lastOpenedScreen !== null && _lastOpenedScreen !== screen;
|
||||
if (screenChanged) {
|
||||
// Hide on this tick so Qt actually tears down the wl_surface; the show
|
||||
// gets deferred below so the unmap is processed before the remap.
|
||||
contentWindow.visible = false;
|
||||
}
|
||||
_lastOpenedScreen = screen;
|
||||
|
||||
if (contentContainer) {
|
||||
// animationsEnabled is false here, so this snaps to closed without animating.
|
||||
morph.openProgress = 0;
|
||||
// Snap morph closed only on a fresh open; on screen-change re-open we stay at 1
|
||||
// because shouldBeVisible doesn't change and won't drive morph back to 1.
|
||||
if (!shouldBeVisible)
|
||||
morph.openProgress = 0;
|
||||
_captureChromeAnimTravel();
|
||||
}
|
||||
|
||||
@@ -375,12 +380,25 @@ Item {
|
||||
_chromeClaimId = "";
|
||||
}
|
||||
|
||||
contentWindow.visible = true;
|
||||
if (screenChanged) {
|
||||
// Defer the show one event-loop tick. Qt coalesces a synchronous
|
||||
// false→true visibility flip into a no-op, leaving WindowBlur committed
|
||||
// to the previous screen's wl_surface. Splitting the flip across ticks
|
||||
// forces a real surface destroy+create so BackgroundEffect.surfaceCreated
|
||||
// fires and the blur region republishes on the new surface.
|
||||
Qt.callLater(() => {
|
||||
if (!root.shouldBeVisible)
|
||||
return;
|
||||
contentWindow.visible = true;
|
||||
popoutBlur.kick();
|
||||
});
|
||||
} else {
|
||||
contentWindow.visible = true;
|
||||
}
|
||||
|
||||
animationsEnabled = true;
|
||||
shouldBeVisible = true;
|
||||
if (shouldBeVisible && screen) {
|
||||
contentWindow.visible = true;
|
||||
PopoutManager.showPopout(popoutHandle);
|
||||
opened();
|
||||
}
|
||||
@@ -1081,7 +1099,9 @@ Item {
|
||||
Connections {
|
||||
target: contentWindow
|
||||
function onVisibleChanged() {
|
||||
if (!contentWindow.visible)
|
||||
// open() flips contentWindow.visible to rebind the layer surface to
|
||||
// a new screen; don't deactivate the wrapper while still open.
|
||||
if (!contentWindow.visible && !root.shouldBeVisible)
|
||||
contentWrapper._renderActive = false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user