forked from quickshell/quickshell
feat(panel): set exclusionMode to Normal when exclusiveZone is set
This commit is contained in:
parent
8cd9657f97
commit
d5344f463f
|
@ -108,6 +108,7 @@ class PanelWindowInterface: public WindowInterface {
|
|||
/// > [!INFO] Only applies to edges with anchors
|
||||
Q_PROPERTY(Margins margins READ margins WRITE setMargins NOTIFY marginsChanged);
|
||||
/// The amount of space reserved for the shell layer relative to its anchors.
|
||||
/// Setting this property sets `exclusionMode` to `Normal`.
|
||||
///
|
||||
/// > [!INFO] Either 1 or 3 anchors are required for the zone to take effect.
|
||||
Q_PROPERTY(qint32 exclusiveZone READ exclusiveZone WRITE setExclusiveZone NOTIFY exclusiveZoneChanged);
|
||||
|
|
|
@ -115,16 +115,16 @@ qint32 WaylandLayershell::exclusiveZone() const { return this->ext->exclusiveZon
|
|||
|
||||
void WaylandLayershell::setExclusiveZone(qint32 exclusiveZone) {
|
||||
this->mExclusiveZone = exclusiveZone;
|
||||
|
||||
if (this->mExclusionMode == ExclusionMode::Normal) {
|
||||
this->ext->setExclusiveZone(exclusiveZone);
|
||||
}
|
||||
this->setExclusionMode(ExclusionMode::Normal);
|
||||
this->ext->setExclusiveZone(exclusiveZone);
|
||||
}
|
||||
|
||||
ExclusionMode::Enum WaylandLayershell::exclusionMode() const { return this->mExclusionMode; }
|
||||
|
||||
void WaylandLayershell::setExclusionMode(ExclusionMode::Enum exclusionMode) {
|
||||
this->mExclusionMode = exclusionMode;
|
||||
if (exclusionMode == this->mExclusionMode) return;
|
||||
|
||||
if (exclusionMode == ExclusionMode::Normal) {
|
||||
this->ext->setExclusiveZone(this->mExclusiveZone);
|
||||
} else if (exclusionMode == ExclusionMode::Ignore) {
|
||||
|
|
Loading…
Reference in a new issue