Changeset View
Changeset View
Standalone View
Standalone View
wayland_server.cpp
Show First 20 Lines • Show All 57 Lines • ▼ Show 20 Line(s) | |||||
58 | #include <KWayland/Server/outputmanagement_interface.h> | 58 | #include <KWayland/Server/outputmanagement_interface.h> | ||
59 | #include <KWayland/Server/outputconfiguration_interface.h> | 59 | #include <KWayland/Server/outputconfiguration_interface.h> | ||
60 | #include <KWayland/Server/xdgshell_interface.h> | 60 | #include <KWayland/Server/xdgshell_interface.h> | ||
61 | #include <KWayland/Server/xdgforeign_interface.h> | 61 | #include <KWayland/Server/xdgforeign_interface.h> | ||
62 | #include <KWayland/Server/xdgoutput_interface.h> | 62 | #include <KWayland/Server/xdgoutput_interface.h> | ||
63 | 63 | | |||
64 | 64 | | |||
65 | // Qt | 65 | // Qt | ||
66 | #include <QDir> | ||||
67 | #include <QFileInfo> | ||||
66 | #include <QThread> | 68 | #include <QThread> | ||
67 | #include <QWindow> | 69 | #include <QWindow> | ||
68 | 70 | | |||
69 | // system | 71 | // system | ||
70 | #include <sys/types.h> | 72 | #include <sys/types.h> | ||
71 | #include <sys/socket.h> | 73 | #include <sys/socket.h> | ||
72 | #include <unistd.h> | 74 | #include <unistd.h> | ||
73 | 75 | | |||
▲ Show 20 Lines • Show All 511 Lines • ▼ Show 20 Line(s) | 585 | [this] { | |||
585 | m_xclipbaordSync.process = nullptr; | 587 | m_xclipbaordSync.process = nullptr; | ||
586 | m_xclipbaordSync.ddi.clear(); | 588 | m_xclipbaordSync.ddi.clear(); | ||
587 | m_xclipbaordSync.client->destroy(); | 589 | m_xclipbaordSync.client->destroy(); | ||
588 | m_xclipbaordSync.client = nullptr; | 590 | m_xclipbaordSync.client = nullptr; | ||
589 | // TODO: restart | 591 | // TODO: restart | ||
590 | } | 592 | } | ||
591 | ); | 593 | ); | ||
592 | m_xclipbaordSync.process->setProcessEnvironment(environment); | 594 | m_xclipbaordSync.process->setProcessEnvironment(environment); | ||
595 | // start from build directory if executable is available there (e.g. autotests), otherwise start libexec executable | ||||
596 | const QFileInfo clipboardSync{QDir{QCoreApplication::applicationDirPath()}, QStringLiteral("org_kde_kwin_xclipboard_syncer")}; | ||||
597 | if (clipboardSync.exists()) { | ||||
598 | m_xclipbaordSync.process->start(clipboardSync.absoluteFilePath()); | ||||
599 | } else { | ||||
593 | m_xclipbaordSync.process->start(QStringLiteral(KWIN_XCLIPBOARD_SYNC_BIN)); | 600 | m_xclipbaordSync.process->start(QStringLiteral(KWIN_XCLIPBOARD_SYNC_BIN)); | ||
594 | } | 601 | } | ||
595 | } | 602 | } | ||
603 | } | ||||
596 | 604 | | |||
597 | void WaylandServer::createInternalConnection() | 605 | void WaylandServer::createInternalConnection() | ||
598 | { | 606 | { | ||
599 | const auto socket = createConnection(); | 607 | const auto socket = createConnection(); | ||
600 | if (!socket.connection) { | 608 | if (!socket.connection) { | ||
601 | return; | 609 | return; | ||
602 | } | 610 | } | ||
603 | m_internalConnection.server = socket.connection; | 611 | m_internalConnection.server = socket.connection; | ||
▲ Show 20 Lines • Show All 188 Lines • Show Last 20 Lines |