Changeset View
Changeset View
Standalone View
Standalone View
wayland_server.cpp
Show First 20 Lines • Show All 239 Lines • ▼ Show 20 Line(s) | 236 | [this] { | |||
---|---|---|---|---|---|
240 | if (workspace()->activeClient() && workspace()->activeClient()->inherits("KWin::Client")) { | 240 | if (workspace()->activeClient() && workspace()->activeClient()->inherits("KWin::Client")) { | ||
241 | m_seat->setSelection(m_xclipbaordSync.ddi.data()); | 241 | m_seat->setSelection(m_xclipbaordSync.ddi.data()); | ||
242 | } | 242 | } | ||
243 | } | 243 | } | ||
244 | ); | 244 | ); | ||
245 | } | 245 | } | ||
246 | } | 246 | } | ||
247 | ); | 247 | ); | ||
248 | auto idle = m_display->createIdle(m_display); | 248 | m_idle = m_display->createIdle(m_display); | ||
249 | idle->create(); | 249 | m_idle->create(); | ||
250 | auto idleInhibition = new IdleInhibition(idle); | 250 | auto idleInhibition = new IdleInhibition(m_idle); | ||
251 | connect(this, &WaylandServer::shellClientAdded, idleInhibition, &IdleInhibition::registerShellClient); | 251 | connect(this, &WaylandServer::shellClientAdded, idleInhibition, &IdleInhibition::registerShellClient); | ||
252 | m_display->createIdleInhibitManager(IdleInhibitManagerInterfaceVersion::UnstableV1, m_display)->create(); | 252 | m_display->createIdleInhibitManager(IdleInhibitManagerInterfaceVersion::UnstableV1, m_display)->create(); | ||
253 | m_plasmaShell = m_display->createPlasmaShell(m_display); | 253 | m_plasmaShell = m_display->createPlasmaShell(m_display); | ||
254 | m_plasmaShell->create(); | 254 | m_plasmaShell->create(); | ||
255 | connect(m_plasmaShell, &PlasmaShellInterface::surfaceCreated, | 255 | connect(m_plasmaShell, &PlasmaShellInterface::surfaceCreated, | ||
256 | [this] (PlasmaShellSurfaceInterface *surface) { | 256 | [this] (PlasmaShellSurfaceInterface *surface) { | ||
257 | if (ShellClient *client = findClient(surface->surface())) { | 257 | if (ShellClient *client = findClient(surface->surface())) { | ||
258 | client->installPlasmaShellSurface(surface); | 258 | client->installPlasmaShellSurface(surface); | ||
▲ Show 20 Lines • Show All 472 Lines • ▼ Show 20 Line(s) | 730 | return ScreenLocker::KSldApp::self()->lockState() == ScreenLocker::KSldApp::Locked || | |||
731 | ScreenLocker::KSldApp::self()->lockState() == ScreenLocker::KSldApp::AcquiringLock; | 731 | ScreenLocker::KSldApp::self()->lockState() == ScreenLocker::KSldApp::AcquiringLock; | ||
732 | } | 732 | } | ||
733 | 733 | | |||
734 | bool WaylandServer::hasScreenLockerIntegration() const | 734 | bool WaylandServer::hasScreenLockerIntegration() const | ||
735 | { | 735 | { | ||
736 | return !m_initFlags.testFlag(InitalizationFlag::NoLockScreenIntegration); | 736 | return !m_initFlags.testFlag(InitalizationFlag::NoLockScreenIntegration); | ||
737 | } | 737 | } | ||
738 | 738 | | |||
739 | void WaylandServer::simulateUserActivity() | ||||
740 | { | ||||
741 | if (m_idle) { | ||||
742 | m_idle->simulateUserActivity(); | ||||
743 | } | ||||
744 | } | ||||
745 | | ||||
739 | } | 746 | } |