Changeset View
Changeset View
Standalone View
Standalone View
shell_client.cpp
Show First 20 Lines • Show All 1329 Lines • ▼ Show 20 Line(s) | 1307 | auto updateRole = [this, surface] { | |||
---|---|---|---|---|---|
1330 | if (type != m_windowType) { | 1330 | if (type != m_windowType) { | ||
1331 | m_windowType = type; | 1331 | m_windowType = type; | ||
1332 | if (m_windowType == NET::Desktop || type == NET::Dock || type == NET::OnScreenDisplay || type == NET::Notification || type == NET::Tooltip) { | 1332 | if (m_windowType == NET::Desktop || type == NET::Dock || type == NET::OnScreenDisplay || type == NET::Notification || type == NET::Tooltip) { | ||
1333 | setOnAllDesktops(true); | 1333 | setOnAllDesktops(true); | ||
1334 | } | 1334 | } | ||
1335 | workspace()->updateClientArea(); | 1335 | workspace()->updateClientArea(); | ||
1336 | } | 1336 | } | ||
1337 | }; | 1337 | }; | ||
1338 | auto updatePopupFlags = [this, surface] { | ||||
1339 | setKeepAbove(surface->popupBehavior() & PlasmaShellSurfaceInterface::PopupBehavior::AlwaysOnTop); | ||||
1340 | }; | ||||
1338 | connect(surface, &PlasmaShellSurfaceInterface::positionChanged, this, updatePosition); | 1341 | connect(surface, &PlasmaShellSurfaceInterface::positionChanged, this, updatePosition); | ||
1339 | connect(surface, &PlasmaShellSurfaceInterface::roleChanged, this, updateRole); | 1342 | connect(surface, &PlasmaShellSurfaceInterface::roleChanged, this, updateRole); | ||
1340 | connect(surface, &PlasmaShellSurfaceInterface::panelBehaviorChanged, this, | 1343 | connect(surface, &PlasmaShellSurfaceInterface::panelBehaviorChanged, this, | ||
1341 | [this] { | 1344 | [this] { | ||
1342 | updateShowOnScreenEdge(); | 1345 | updateShowOnScreenEdge(); | ||
1343 | workspace()->updateClientArea(); | 1346 | workspace()->updateClientArea(); | ||
1344 | } | 1347 | } | ||
1345 | ); | 1348 | ); | ||
1349 | | ||||
1350 | connect(surface, &PlasmaShellSurfaceInterface::popupBehaviorChanged, this, updatePopupFlags); | ||||
1351 | | ||||
1346 | connect(surface, &PlasmaShellSurfaceInterface::panelAutoHideHideRequested, this, | 1352 | connect(surface, &PlasmaShellSurfaceInterface::panelAutoHideHideRequested, this, | ||
1347 | [this] { | 1353 | [this] { | ||
1348 | hideClient(true); | 1354 | hideClient(true); | ||
1349 | m_plasmaShellSurface->hideAutoHidingPanel(); | 1355 | m_plasmaShellSurface->hideAutoHidingPanel(); | ||
1350 | updateShowOnScreenEdge(); | 1356 | updateShowOnScreenEdge(); | ||
1351 | } | 1357 | } | ||
1352 | ); | 1358 | ); | ||
1353 | connect(surface, &PlasmaShellSurfaceInterface::panelAutoHideShowRequested, this, | 1359 | connect(surface, &PlasmaShellSurfaceInterface::panelAutoHideShowRequested, this, | ||
1354 | [this] { | 1360 | [this] { | ||
1355 | hideClient(false); | 1361 | hideClient(false); | ||
1356 | ScreenEdges::self()->reserve(this, ElectricNone); | 1362 | ScreenEdges::self()->reserve(this, ElectricNone); | ||
1357 | m_plasmaShellSurface->showAutoHidingPanel(); | 1363 | m_plasmaShellSurface->showAutoHidingPanel(); | ||
1358 | } | 1364 | } | ||
1359 | ); | 1365 | ); | ||
1366 | updatePopupFlags(); | ||||
1360 | updatePosition(); | 1367 | updatePosition(); | ||
1361 | updateRole(); | 1368 | updateRole(); | ||
1362 | updateShowOnScreenEdge(); | 1369 | updateShowOnScreenEdge(); | ||
1363 | connect(this, &ShellClient::geometryChanged, this, &ShellClient::updateShowOnScreenEdge); | 1370 | connect(this, &ShellClient::geometryChanged, this, &ShellClient::updateShowOnScreenEdge); | ||
1364 | 1371 | | |||
1365 | setSkipTaskbar(surface->skipTaskbar()); | 1372 | setSkipTaskbar(surface->skipTaskbar()); | ||
1366 | connect(surface, &PlasmaShellSurfaceInterface::skipTaskbarChanged, this, [this] { | 1373 | connect(surface, &PlasmaShellSurfaceInterface::skipTaskbarChanged, this, [this] { | ||
1367 | setSkipTaskbar(m_plasmaShellSurface->skipTaskbar()); | 1374 | setSkipTaskbar(m_plasmaShellSurface->skipTaskbar()); | ||
▲ Show 20 Lines • Show All 628 Lines • Show Last 20 Lines |