Commit 6a501595 authored by David Redondo's avatar David Redondo 🏎
Browse files

Guard calls into layer shell

LayerShellQt::Window::get always returns a Window, ensure we only
do it on Wayland.
BUG:439356
FIXED-IN:5.22.3


(cherry picked from commit 211897b0)
parent 546ea04c
......@@ -209,10 +209,12 @@ void KSMShutdownDlg::init()
setKeyboardGrabEnabled(true);
KWindowEffects::enableBlurBehind(this, true);
if (auto w = LayerShellQt::Window::get(this)) {
w->setKeyboardInteractivity(LayerShellQt::Window::KeyboardInteractivityExclusive);
w->setExclusiveZone(-1);
w->setLayer(LayerShellQt::Window::LayerOverlay);
if (KWindowSystem::isPlatformWayland()) {
if (auto w = LayerShellQt::Window::get(this)) {
w->setKeyboardInteractivity(LayerShellQt::Window::KeyboardInteractivityExclusive);
w->setExclusiveZone(-1);
w->setLayer(LayerShellQt::Window::LayerOverlay);
}
}
}
......
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