Changeset View
Changeset View
Standalone View
Standalone View
wayland_server.cpp
Show First 20 Lines • Show All 398 Lines • ▼ Show 20 Line(s) | 384 | [] (PlasmaWindowManagementInterface::ShowingDesktopState state) { | |||
---|---|---|---|---|---|
399 | } | 399 | } | ||
400 | if (set == workspace()->showingDesktop()) { | 400 | if (set == workspace()->showingDesktop()) { | ||
401 | return; | 401 | return; | ||
402 | } | 402 | } | ||
403 | workspace()->setShowingDesktop(set); | 403 | workspace()->setShowingDesktop(set); | ||
404 | } | 404 | } | ||
405 | ); | 405 | ); | ||
406 | 406 | | |||
407 | | ||||
408 | m_virtualDesktopManagement = m_display->createPlasmaVirtualDesktopManagement(m_display); | 407 | m_virtualDesktopManagement = m_display->createPlasmaVirtualDesktopManagement(m_display); | ||
409 | m_virtualDesktopManagement->create(); | 408 | m_virtualDesktopManagement->create(); | ||
410 | m_windowManagement->setPlasmaVirtualDesktopManagementInterface(m_virtualDesktopManagement); | 409 | m_windowManagement->setPlasmaVirtualDesktopManagementInterface(m_virtualDesktopManagement); | ||
411 | 410 | | |||
412 | auto shadowManager = m_display->createShadowManager(m_display); | 411 | auto shadowManager = m_display->createShadowManager(m_display); | ||
413 | shadowManager->create(); | 412 | shadowManager->create(); | ||
414 | 413 | | |||
415 | m_display->createDpmsManager(m_display)->create(); | 414 | m_display->createDpmsManager(m_display)->create(); | ||
▲ Show 20 Lines • Show All 69 Lines • ▼ Show 20 Line(s) | 483 | connect(workspace(), &Workspace::showingDesktopChanged, this, | |||
485 | [this] (bool set) { | 484 | [this] (bool set) { | ||
486 | using namespace KWayland::Server; | 485 | using namespace KWayland::Server; | ||
487 | m_windowManagement->setShowingDesktopState(set ? | 486 | m_windowManagement->setShowingDesktopState(set ? | ||
488 | PlasmaWindowManagementInterface::ShowingDesktopState::Enabled : | 487 | PlasmaWindowManagementInterface::ShowingDesktopState::Enabled : | ||
489 | PlasmaWindowManagementInterface::ShowingDesktopState::Disabled | 488 | PlasmaWindowManagementInterface::ShowingDesktopState::Disabled | ||
490 | ); | 489 | ); | ||
491 | } | 490 | } | ||
492 | ); | 491 | ); | ||
492 | | ||||
493 | connect(workspace(), &Workspace::workspaceInitialized, this, [this] { | ||||
494 | auto f = [this] () { | ||||
495 | QVector<quint32> ids; | ||||
496 | for (Toplevel *client: workspace()->stackingOrder()) { | ||||
zzagUnsubmitted Not Done
zzag: - No short variable names please.
- Don't erase types if it makes reading code more difficult… | |||||
stackingOrder() doesn't necessarily contains only clients. It can also contain Deleted toplevels. Please rename client to toplevel. We also put whitespace before and after :. zzag: stackingOrder() doesn't necessarily contains only clients. It can also contain Deleted… | |||||
497 | auto *abstract_client = qobject_cast<AbstractClient *>(client); | ||||
zzag: No snake_case please. | |||||
498 | if (abstract_client && abstract_client->windowManagementInterface()) { | ||||
zzag: How's this possible? | |||||
I guess is now impossible (I have made this guard before executing this code inside a slot connected to workspaceInitialized bport: I guess is now impossible (I have made this guard before executing this code inside a slot… | |||||
499 | ids << abstract_client->windowManagementInterface()->internalId(); | ||||
500 | } | ||||
501 | } | ||||
502 | m_windowManagement->setStackingOrder(ids); | ||||
503 | }; | ||||
504 | f(); | ||||
505 | connect(workspace(), &Workspace::stackingOrderChanged, this, f); | ||||
506 | }); | ||||
493 | } | 507 | } | ||
494 | 508 | | |||
495 | if (hasScreenLockerIntegration()) { | 509 | if (hasScreenLockerIntegration()) { | ||
496 | if (m_internalConnection.interfacesAnnounced) { | 510 | if (m_internalConnection.interfacesAnnounced) { | ||
497 | initScreenLocker(); | 511 | initScreenLocker(); | ||
498 | } else { | 512 | } else { | ||
499 | connect(m_internalConnection.registry, &KWayland::Client::Registry::interfacesAnnounced, this, &WaylandServer::initScreenLocker); | 513 | connect(m_internalConnection.registry, &KWayland::Client::Registry::interfacesAnnounced, this, &WaylandServer::initScreenLocker); | ||
500 | } | 514 | } | ||
▲ Show 20 Lines • Show All 322 Lines • Show Last 20 Lines |