Changeset View
Changeset View
Standalone View
Standalone View
kstyle/breezeshadowhelper.cpp
Show First 20 Lines • Show All 84 Lines • ▼ Show 20 Line(s) | 84 | { | |||
---|---|---|---|---|---|
85 | #if BREEZE_HAVE_KWAYLAND | 85 | #if BREEZE_HAVE_KWAYLAND | ||
86 | if( !Helper::isWayland() ) return; | 86 | if( !Helper::isWayland() ) return; | ||
87 | 87 | | |||
88 | using namespace KWayland::Client; | 88 | using namespace KWayland::Client; | ||
89 | auto connection = ConnectionThread::fromApplication( this ); | 89 | auto connection = ConnectionThread::fromApplication( this ); | ||
90 | if( !connection ) { | 90 | if( !connection ) { | ||
91 | return; | 91 | return; | ||
92 | } | 92 | } | ||
93 | auto registry = new Registry( this ); | 93 | auto registry = new Registry( connection ); | ||
94 | registry->create( connection ); | 94 | registry->create( connection ); | ||
95 | connect(registry, &Registry::interfacesAnnounced, this, | 95 | connect(registry, &Registry::interfacesAnnounced, this, | ||
96 | [registry, this] { | 96 | [registry, this] { | ||
97 | const auto interface = registry->interface( Registry::Interface::Shadow ); | 97 | const auto interface = registry->interface( Registry::Interface::Shadow ); | ||
98 | if( interface.name != 0 ) { | 98 | if( interface.name != 0 ) { | ||
99 | _shadowManager = registry->createShadowManager( interface.name, interface.version, this ); | 99 | _shadowManager = registry->createShadowManager( interface.name, interface.version, registry ); | ||
100 | } | 100 | } | ||
101 | const auto shmInterface = registry->interface( Registry::Interface::Shm ); | 101 | const auto shmInterface = registry->interface( Registry::Interface::Shm ); | ||
102 | if( shmInterface.name != 0 ) { | 102 | if( shmInterface.name != 0 ) { | ||
103 | _shmPool = registry->createShmPool( shmInterface.name, shmInterface.version, this ); | 103 | _shmPool = registry->createShmPool( shmInterface.name, shmInterface.version, registry ); | ||
104 | } | 104 | } | ||
105 | } | 105 | } | ||
106 | ); | 106 | ); | ||
107 | 107 | | |||
108 | registry->setup(); | 108 | registry->setup(); | ||
109 | connection->roundtrip(); | 109 | connection->roundtrip(); | ||
110 | #endif | 110 | #endif | ||
111 | } | 111 | } | ||
▲ Show 20 Lines • Show All 469 Lines • Show Last 20 Lines |