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
This commit is contained in:
parent
c29c165032
commit
a823474ec3
1 changed files with 6 additions and 3 deletions
|
@ -1011,11 +1011,14 @@ bool XdgShellClient::acceptsFocus() const
|
|||
}
|
||||
if (m_plasmaShellSurface) {
|
||||
if (m_plasmaShellSurface->role() == PlasmaShellSurfaceInterface::Role::OnScreenDisplay ||
|
||||
m_plasmaShellSurface->role() == PlasmaShellSurfaceInterface::Role::ToolTip ||
|
||||
m_plasmaShellSurface->role() == PlasmaShellSurfaceInterface::Role::Notification ||
|
||||
m_plasmaShellSurface->role() == PlasmaShellSurfaceInterface::Role::CriticalNotification) {
|
||||
m_plasmaShellSurface->role() == PlasmaShellSurfaceInterface::Role::ToolTip) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (m_plasmaShellSurface->role() == PlasmaShellSurfaceInterface::Role::Notification ||
|
||||
m_plasmaShellSurface->role() == PlasmaShellSurfaceInterface::Role::CriticalNotification) {
|
||||
return m_plasmaShellSurface->panelTakesFocus();
|
||||
}
|
||||
}
|
||||
if (m_closing) {
|
||||
// a closing window does not accept focus
|
||||
|
|
Loading…
Reference in a new issue