mirror of
https://invent.kde.org/plasma/layer-shell-qt.git
synced 2025-07-16 03:54:25 -04:00
Add desiredScreen property to LayerShellQt::Window
If the property is set, the compositor will try to put the window on the given output. If not set, the compositer will decide where to put the window (usually the active output). The motivation for this change is the ability for KRunner to always appear on the active output.
This commit is contained in:
@ -28,6 +28,7 @@ public:
|
||||
Window::Layer layer = Window::LayerTop;
|
||||
QMargins margins;
|
||||
QWaylandLayerSurface *getSurface() const;
|
||||
QPointer<QScreen> desiredOutput;
|
||||
};
|
||||
|
||||
static QMap<QWindow *, Window *> s_map;
|
||||
@ -113,6 +114,16 @@ Window::Layer Window::layer() const
|
||||
return d->layer;
|
||||
}
|
||||
|
||||
QScreen *Window::desiredOutput() const
|
||||
{
|
||||
return d->desiredOutput;
|
||||
}
|
||||
|
||||
void Window::setDesiredOutput(QScreen *output)
|
||||
{
|
||||
d->desiredOutput = output;
|
||||
}
|
||||
|
||||
Window::Window(QWindow *window)
|
||||
: QObject(window)
|
||||
, d(new WindowPrivate(window))
|
||||
|
Reference in New Issue
Block a user