mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-08-01 19:18:28 -04:00
popout: fix lifecycle of blur with various popouts
fixes #2901 port 1.5
This commit is contained in:
@@ -65,16 +65,35 @@ Singleton {
|
||||
|
||||
function _openPopout(popout) {
|
||||
if (popout.dashVisible !== undefined) {
|
||||
if (popout.dashVisible && !popout.shouldBeVisible && !popout.isClosing)
|
||||
let flagStayedTrue = popout.dashVisible === true;
|
||||
if (popout.dashVisible && !popout.shouldBeVisible && !popout.isClosing) {
|
||||
popout.dashVisible = false;
|
||||
flagStayedTrue = false;
|
||||
}
|
||||
popout.dashVisible = true;
|
||||
// Flag already true (e.g. retargeting to another monitor) won't re-fire
|
||||
// the change handler, so drive the surface open explicitly.
|
||||
if (flagStayedTrue)
|
||||
_ensureSurfaceOpen(popout);
|
||||
return;
|
||||
}
|
||||
if (popout.notificationHistoryVisible !== undefined) {
|
||||
const flagStayedTrue = popout.notificationHistoryVisible === true;
|
||||
popout.notificationHistoryVisible = true;
|
||||
if (flagStayedTrue)
|
||||
_ensureSurfaceOpen(popout);
|
||||
return;
|
||||
}
|
||||
popout.open();
|
||||
_ensureSurfaceOpen(popout);
|
||||
}
|
||||
|
||||
function _ensureSurfaceOpen(popout) {
|
||||
if (typeof popout.present === "function") {
|
||||
popout.present();
|
||||
return;
|
||||
}
|
||||
if (typeof popout.open === "function")
|
||||
popout.open();
|
||||
}
|
||||
|
||||
function _closePopout(popout) {
|
||||
|
||||
Reference in New Issue
Block a user