Changeset View
Changeset View
Standalone View
Standalone View
wayland_server.cpp
Show All 24 Lines | |||||
25 | #include "screens.h" | 25 | #include "screens.h" | ||
26 | #include "shell_client.h" | 26 | #include "shell_client.h" | ||
27 | #include "workspace.h" | 27 | #include "workspace.h" | ||
28 | 28 | | |||
29 | // Client | 29 | // Client | ||
30 | #include <KWayland/Client/connection_thread.h> | 30 | #include <KWayland/Client/connection_thread.h> | ||
31 | #include <KWayland/Client/event_queue.h> | 31 | #include <KWayland/Client/event_queue.h> | ||
32 | #include <KWayland/Client/registry.h> | 32 | #include <KWayland/Client/registry.h> | ||
33 | #include <KWayland/Client/compositor.h> | ||||
33 | #include <KWayland/Client/seat.h> | 34 | #include <KWayland/Client/seat.h> | ||
34 | #include <KWayland/Client/datadevicemanager.h> | 35 | #include <KWayland/Client/datadevicemanager.h> | ||
35 | #include <KWayland/Client/shm_pool.h> | 36 | #include <KWayland/Client/shm_pool.h> | ||
36 | #include <KWayland/Client/surface.h> | 37 | #include <KWayland/Client/surface.h> | ||
37 | // Server | 38 | // Server | ||
38 | #include <KWayland/Server/appmenu_interface.h> | 39 | #include <KWayland/Server/appmenu_interface.h> | ||
39 | #include <KWayland/Server/compositor_interface.h> | 40 | #include <KWayland/Server/compositor_interface.h> | ||
40 | #include <KWayland/Server/datadevicemanager_interface.h> | 41 | #include <KWayland/Server/datadevicemanager_interface.h> | ||
▲ Show 20 Lines • Show All 63 Lines • ▼ Show 20 Line(s) | 102 | if (m_internalConnection.client) { | |||
104 | for (auto c : connections) { | 105 | for (auto c : connections) { | ||
105 | if (c == m_internalConnection.client) { | 106 | if (c == m_internalConnection.client) { | ||
106 | continue; | 107 | continue; | ||
107 | } | 108 | } | ||
108 | emit c->connectionDied(); | 109 | emit c->connectionDied(); | ||
109 | } | 110 | } | ||
110 | 111 | | |||
111 | delete m_internalConnection.registry; | 112 | delete m_internalConnection.registry; | ||
113 | delete m_internalConnection.comp; | ||||
112 | delete m_internalConnection.seat; | 114 | delete m_internalConnection.seat; | ||
113 | delete m_internalConnection.ddm; | 115 | delete m_internalConnection.ddm; | ||
114 | delete m_internalConnection.shm; | 116 | delete m_internalConnection.shm; | ||
115 | dispatch(); | 117 | dispatch(); | ||
116 | m_internalConnection.client->deleteLater(); | 118 | m_internalConnection.client->deleteLater(); | ||
117 | m_internalConnection.clientThread->quit(); | 119 | m_internalConnection.clientThread->quit(); | ||
118 | m_internalConnection.clientThread->wait(); | 120 | m_internalConnection.clientThread->wait(); | ||
119 | delete m_internalConnection.clientThread; | 121 | delete m_internalConnection.clientThread; | ||
▲ Show 20 Lines • Show All 428 Lines • ▼ Show 20 Line(s) | 549 | connect(registry, &Registry::shmAnnounced, this, | |||
548 | [this] (quint32 name, quint32 version) { | 550 | [this] (quint32 name, quint32 version) { | ||
549 | m_internalConnection.shm = m_internalConnection.registry->createShmPool(name, version, this); | 551 | m_internalConnection.shm = m_internalConnection.registry->createShmPool(name, version, this); | ||
550 | } | 552 | } | ||
551 | ); | 553 | ); | ||
552 | connect(registry, &Registry::interfacesAnnounced, this, | 554 | connect(registry, &Registry::interfacesAnnounced, this, | ||
553 | [this, registry] { | 555 | [this, registry] { | ||
554 | m_internalConnection.interfacesAnnounced = true; | 556 | m_internalConnection.interfacesAnnounced = true; | ||
555 | 557 | | |||
558 | const auto compInterface = registry->interface(Registry::Interface::Compositor); | ||||
559 | if (compInterface.name != 0) { | ||||
560 | m_internalConnection.comp = registry->createCompositor(compInterface.name, compInterface.version, this); | ||||
561 | } | ||||
556 | const auto seatInterface = registry->interface(Registry::Interface::Seat); | 562 | const auto seatInterface = registry->interface(Registry::Interface::Seat); | ||
557 | if (seatInterface.name != 0) { | 563 | if (seatInterface.name != 0) { | ||
558 | m_internalConnection.seat = registry->createSeat(seatInterface.name, seatInterface.version, this); | 564 | m_internalConnection.seat = registry->createSeat(seatInterface.name, seatInterface.version, this); | ||
559 | } | 565 | } | ||
560 | const auto ddmInterface = registry->interface(Registry::Interface::DataDeviceManager); | 566 | const auto ddmInterface = registry->interface(Registry::Interface::DataDeviceManager); | ||
561 | if (ddmInterface.name != 0) { | 567 | if (ddmInterface.name != 0) { | ||
562 | m_internalConnection.ddm = registry->createDataDeviceManager(ddmInterface.name, ddmInterface.version, this); | 568 | m_internalConnection.ddm = registry->createDataDeviceManager(ddmInterface.name, ddmInterface.version, this); | ||
563 | } | 569 | } | ||
▲ Show 20 Lines • Show All 165 Lines • Show Last 20 Lines |