[Wayland] Ensure pinned popup end up on the panel layer
The pinned popups need to act as a "panel extension". Easiest way to achieve this on Wayland is to just make sure they end up on the panel layer. This is simply done by changing the role on their corresponding surface so that KWin treat them properly (as in like a panel but with windows able to go under). Neat way of doing it like this is that it will work wherever the popup parent is coming from (a panel or the desktop). BUG: 400317
This commit is contained in:
parent
e0b7aa680c
commit
799121e70b
@ -738,6 +738,19 @@ void DialogPrivate::applyType()
|
||||
}
|
||||
} else {
|
||||
q->setFlags(Qt::FramelessWindowHint | q->flags());
|
||||
|
||||
#if HAVE_KWAYLAND
|
||||
// Only possible after setup
|
||||
if (shellSurface) {
|
||||
if (q->flags() & Qt::WindowStaysOnTopHint) {
|
||||
shellSurface->setRole(KWayland::Client::PlasmaShellSurface::Role::Panel);
|
||||
shellSurface->setPanelBehavior(KWayland::Client::PlasmaShellSurface::PanelBehavior::WindowsGoBelow);
|
||||
} else {
|
||||
shellSurface->setRole(KWayland::Client::PlasmaShellSurface::Role::Normal);
|
||||
shellSurface->setPanelBehavior(KWayland::Client::PlasmaShellSurface::PanelBehavior::AlwaysVisible);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// an OSD can't be a Dialog, as qt xcb would attempt to set a transient parent for it
|
||||
|
Loading…
Reference in New Issue
Block a user