Commit a823474e authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇
Browse files

Honour panelTakesFocus for other plasmashell types

The semantics of a window taking focus on user interaction apply to more roles. See D25851.

Given it is used by KWindowSystem::forceActivateWindow in kwayland-integration,
it makes sense to pass focus to the window once it gets this property set.

Differential Revision: https://phabricator.kde.org/D25968
parent c29c1650
...@@ -1011,11 +1011,14 @@ bool XdgShellClient::acceptsFocus() const ...@@ -1011,11 +1011,14 @@ bool XdgShellClient::acceptsFocus() const
} }
if (m_plasmaShellSurface) { if (m_plasmaShellSurface) {
if (m_plasmaShellSurface->role() == PlasmaShellSurfaceInterface::Role::OnScreenDisplay || if (m_plasmaShellSurface->role() == PlasmaShellSurfaceInterface::Role::OnScreenDisplay ||
m_plasmaShellSurface->role() == PlasmaShellSurfaceInterface::Role::ToolTip || m_plasmaShellSurface->role() == PlasmaShellSurfaceInterface::Role::ToolTip) {
m_plasmaShellSurface->role() == PlasmaShellSurfaceInterface::Role::Notification ||
m_plasmaShellSurface->role() == PlasmaShellSurfaceInterface::Role::CriticalNotification) {
return false; return false;
} }
if (m_plasmaShellSurface->role() == PlasmaShellSurfaceInterface::Role::Notification ||
m_plasmaShellSurface->role() == PlasmaShellSurfaceInterface::Role::CriticalNotification) {
return m_plasmaShellSurface->panelTakesFocus();
}
} }
if (m_closing) { if (m_closing) {
// a closing window does not accept focus // a closing window does not accept focus
......
Markdown is supported
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