Changeset View
Changeset View
Standalone View
Standalone View
shell_client.cpp
Show First 20 Lines • Show All 1039 Lines • ▼ Show 20 Line(s) | |||||
1040 | bool ShellClient::acceptsFocus() const | 1040 | bool ShellClient::acceptsFocus() const | ||
1041 | { | 1041 | { | ||
1042 | if (waylandServer()->inputMethodConnection() == surface()->client()) { | 1042 | if (waylandServer()->inputMethodConnection() == surface()->client()) { | ||
1043 | return false; | 1043 | return false; | ||
1044 | } | 1044 | } | ||
1045 | if (m_plasmaShellSurface) { | 1045 | if (m_plasmaShellSurface) { | ||
1046 | if (m_plasmaShellSurface->role() == PlasmaShellSurfaceInterface::Role::OnScreenDisplay || | 1046 | if (m_plasmaShellSurface->role() == PlasmaShellSurfaceInterface::Role::OnScreenDisplay || | ||
1047 | m_plasmaShellSurface->role() == PlasmaShellSurfaceInterface::Role::ToolTip || | 1047 | m_plasmaShellSurface->role() == PlasmaShellSurfaceInterface::Role::ToolTip || | ||
1048 | m_plasmaShellSurface->role() == PlasmaShellSurfaceInterface::Role::Notification) { | 1048 | m_plasmaShellSurface->role() == PlasmaShellSurfaceInterface::Role::Notification || | ||
1049 | m_plasmaShellSurface->role() == PlasmaShellSurfaceInterface::Role::CriticalNotification) { | ||||
1049 | return false; | 1050 | return false; | ||
1050 | } | 1051 | } | ||
1051 | } | 1052 | } | ||
1052 | if (m_closing) { | 1053 | if (m_closing) { | ||
1053 | // a closing window does not accept focus | 1054 | // a closing window does not accept focus | ||
1054 | return false; | 1055 | return false; | ||
1055 | } | 1056 | } | ||
1056 | if (m_unmapped) { | 1057 | if (m_unmapped) { | ||
▲ Show 20 Lines • Show All 168 Lines • ▼ Show 20 Line(s) | 1225 | case PlasmaShellSurfaceInterface::Role::OnScreenDisplay: | |||
1225 | type = NET::OnScreenDisplay; | 1226 | type = NET::OnScreenDisplay; | ||
1226 | break; | 1227 | break; | ||
1227 | case PlasmaShellSurfaceInterface::Role::Notification: | 1228 | case PlasmaShellSurfaceInterface::Role::Notification: | ||
1228 | type = NET::Notification; | 1229 | type = NET::Notification; | ||
1229 | break; | 1230 | break; | ||
1230 | case PlasmaShellSurfaceInterface::Role::ToolTip: | 1231 | case PlasmaShellSurfaceInterface::Role::ToolTip: | ||
1231 | type = NET::Tooltip; | 1232 | type = NET::Tooltip; | ||
1232 | break; | 1233 | break; | ||
1234 | case PlasmaShellSurfaceInterface::Role::CriticalNotification: | ||||
1235 | type = NET::CriticalNotification; | ||||
1236 | break; | ||||
1233 | case PlasmaShellSurfaceInterface::Role::Normal: | 1237 | case PlasmaShellSurfaceInterface::Role::Normal: | ||
1234 | default: | 1238 | default: | ||
1235 | type = NET::Normal; | 1239 | type = NET::Normal; | ||
1236 | break; | 1240 | break; | ||
1237 | } | 1241 | } | ||
1238 | if (type != m_windowType) { | 1242 | if (type != m_windowType) { | ||
1239 | m_windowType = type; | 1243 | m_windowType = type; | ||
1240 | if (m_windowType == NET::Desktop || type == NET::Dock || type == NET::OnScreenDisplay || type == NET::Notification || type == NET::Tooltip) { | 1244 | if (m_windowType == NET::Desktop || type == NET::Dock || type == NET::OnScreenDisplay || type == NET::Notification || type == NET::Tooltip || type == NET::CriticalNotification) { | ||
1241 | setOnAllDesktops(true); | 1245 | setOnAllDesktops(true); | ||
1242 | } | 1246 | } | ||
1243 | workspace()->updateClientArea(); | 1247 | workspace()->updateClientArea(); | ||
1244 | } | 1248 | } | ||
1245 | }; | 1249 | }; | ||
1246 | connect(surface, &PlasmaShellSurfaceInterface::positionChanged, this, updatePosition); | 1250 | connect(surface, &PlasmaShellSurfaceInterface::positionChanged, this, updatePosition); | ||
1247 | connect(surface, &PlasmaShellSurfaceInterface::roleChanged, this, updateRole); | 1251 | connect(surface, &PlasmaShellSurfaceInterface::roleChanged, this, updateRole); | ||
1248 | connect(surface, &PlasmaShellSurfaceInterface::panelBehaviorChanged, this, | 1252 | connect(surface, &PlasmaShellSurfaceInterface::panelBehaviorChanged, this, | ||
▲ Show 20 Lines • Show All 637 Lines • Show Last 20 Lines |