mirror of
https://invent.kde.org/plasma/layer-shell-qt.git
synced 2025-07-14 11:04:20 -04:00
Add a new setExclusiveEdge call in the protocol
This can be used to disambiguate the exclusive edge when the anchors are on a corner (so there would be 2 candidates) it's quite quick and dirty mostly to understand if we do want to push for something along the lines
This commit is contained in:
committed by
Vlad Zahorodnii
parent
f1e50306f8
commit
ad5246f0d0
@ -28,6 +28,7 @@ public:
|
||||
QString scope = QStringLiteral("window");
|
||||
Window::Anchors anchors = {Window::AnchorTop | Window::AnchorBottom | Window::AnchorLeft | Window::AnchorRight};
|
||||
int32_t exclusionZone = 0;
|
||||
Window::Anchor exclusiveEdge = Window::AnchorNone;
|
||||
Window::KeyboardInteractivity keyboardInteractivity = Window::KeyboardInteractivityOnDemand;
|
||||
Window::Layer layer = Window::LayerTop;
|
||||
QMargins margins;
|
||||
@ -68,6 +69,21 @@ int32_t Window::exclusionZone() const
|
||||
return d->exclusionZone;
|
||||
}
|
||||
|
||||
void Window::setExclusiveEdge(Window::Anchor edge)
|
||||
{
|
||||
if (d->exclusiveEdge == edge) {
|
||||
return;
|
||||
}
|
||||
|
||||
d->exclusiveEdge = edge;
|
||||
Q_EMIT exclusiveEdgeChanged();
|
||||
}
|
||||
|
||||
Window::Anchor Window::exclusiveEdge() const
|
||||
{
|
||||
return d->exclusiveEdge;
|
||||
}
|
||||
|
||||
void Window::setMargins(const QMargins &margins)
|
||||
{
|
||||
if (d->margins != margins) {
|
||||
|
Reference in New Issue
Block a user