Commit d40d3605 authored by David Edmundson's avatar David Edmundson
Browse files

Always sync the setPanelBehavior to wayland

Currently this code is in the else statement to if (type !=
Dialog::Normal) {

This doesn't make sense as panel roles apply explicitly to other types,
like Dialog::Dock. On X11 the equivalent always applies.

BUG: 426969
parent cd153f01
Pipeline #122608 passed with stage
in 2 minutes and 39 seconds
......@@ -766,20 +766,20 @@ void DialogPrivate::applyType()
#endif
} 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);
}
// 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
}
#endif
// an OSD can't be a Dialog, as qt xcb would attempt to set a transient parent for it
// see bug 370433
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment