File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed
src/wayland/wlr_layershell Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -21,11 +21,16 @@ WlrLayershell::WlrLayershell(QObject* parent): ProxyWindowBase(parent) {
21
21
case ExclusionMode::Ignore: return -1 ;
22
22
case ExclusionMode::Normal: return this ->bExclusiveZone ;
23
23
case ExclusionMode::Auto:
24
- const auto edge = this ->bcExclusionEdge .value ();
25
-
26
- if (edge == Qt::TopEdge || edge == Qt::BottomEdge) return this ->bImplicitHeight ;
27
- else if (edge == Qt::LeftEdge || edge == Qt::RightEdge) return this ->bImplicitWidth ;
28
- else return 0 ;
24
+ const auto margins = this ->bMargins .value ();
25
+
26
+ // add reverse edge margins which are ignored by wlr-layer-shell
27
+ switch (this ->bcExclusionEdge .value ()) {
28
+ case Qt::TopEdge: return this ->bImplicitHeight + margins.bottom ;
29
+ case Qt::BottomEdge: return this ->bImplicitHeight + margins.top ;
30
+ case Qt::LeftEdge: return this ->bImplicitHeight + margins.right ;
31
+ case Qt::RightEdge: return this ->bImplicitHeight + margins.left ;
32
+ default : return 0 ;
33
+ }
29
34
}
30
35
});
31
36
You can’t perform that action at this time.
0 commit comments