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 67 Lines • ▼ Show 20 Line(s) | 106 | if (m_internalConnection.client) { | |||
108 | for (auto c : connections) { | 109 | for (auto c : connections) { | ||
109 | if (c == m_internalConnection.client) { | 110 | if (c == m_internalConnection.client) { | ||
110 | continue; | 111 | continue; | ||
111 | } | 112 | } | ||
112 | emit c->connectionDied(); | 113 | emit c->connectionDied(); | ||
113 | } | 114 | } | ||
114 | 115 | | |||
115 | delete m_internalConnection.registry; | 116 | delete m_internalConnection.registry; | ||
117 | delete m_internalConnection.compositor; | ||||
116 | delete m_internalConnection.seat; | 118 | delete m_internalConnection.seat; | ||
117 | delete m_internalConnection.ddm; | 119 | delete m_internalConnection.ddm; | ||
118 | delete m_internalConnection.shm; | 120 | delete m_internalConnection.shm; | ||
119 | dispatch(); | 121 | dispatch(); | ||
120 | m_internalConnection.client->deleteLater(); | 122 | m_internalConnection.client->deleteLater(); | ||
121 | m_internalConnection.clientThread->quit(); | 123 | m_internalConnection.clientThread->quit(); | ||
122 | m_internalConnection.clientThread->wait(); | 124 | m_internalConnection.clientThread->wait(); | ||
123 | delete m_internalConnection.clientThread; | 125 | delete m_internalConnection.clientThread; | ||
▲ Show 20 Lines • Show All 438 Lines • ▼ Show 20 Line(s) | 563 | connect(registry, &Registry::shmAnnounced, this, | |||
562 | [this] (quint32 name, quint32 version) { | 564 | [this] (quint32 name, quint32 version) { | ||
563 | m_internalConnection.shm = m_internalConnection.registry->createShmPool(name, version, this); | 565 | m_internalConnection.shm = m_internalConnection.registry->createShmPool(name, version, this); | ||
564 | } | 566 | } | ||
565 | ); | 567 | ); | ||
566 | connect(registry, &Registry::interfacesAnnounced, this, | 568 | connect(registry, &Registry::interfacesAnnounced, this, | ||
567 | [this, registry] { | 569 | [this, registry] { | ||
568 | m_internalConnection.interfacesAnnounced = true; | 570 | m_internalConnection.interfacesAnnounced = true; | ||
569 | 571 | | |||
572 | const auto compInterface = registry->interface(Registry::Interface::Compositor); | ||||
573 | if (compInterface.name != 0) { | ||||
574 | m_internalConnection.compositor = registry->createCompositor(compInterface.name, compInterface.version, this); | ||||
575 | } | ||||
570 | const auto seatInterface = registry->interface(Registry::Interface::Seat); | 576 | const auto seatInterface = registry->interface(Registry::Interface::Seat); | ||
571 | if (seatInterface.name != 0) { | 577 | if (seatInterface.name != 0) { | ||
572 | m_internalConnection.seat = registry->createSeat(seatInterface.name, seatInterface.version, this); | 578 | m_internalConnection.seat = registry->createSeat(seatInterface.name, seatInterface.version, this); | ||
573 | } | 579 | } | ||
574 | const auto ddmInterface = registry->interface(Registry::Interface::DataDeviceManager); | 580 | const auto ddmInterface = registry->interface(Registry::Interface::DataDeviceManager); | ||
575 | if (ddmInterface.name != 0) { | 581 | if (ddmInterface.name != 0) { | ||
576 | m_internalConnection.ddm = registry->createDataDeviceManager(ddmInterface.name, ddmInterface.version, this); | 582 | m_internalConnection.ddm = registry->createDataDeviceManager(ddmInterface.name, ddmInterface.version, this); | ||
577 | } | 583 | } | ||
▲ Show 20 Lines • Show All 170 Lines • Show Last 20 Lines |