diff --git a/src/xwayland/xwayland.cpp b/src/xwayland/xwayland.cpp index e90bae34e6..10bf086d8a 100644 --- a/src/xwayland/xwayland.cpp +++ b/src/xwayland/xwayland.cpp @@ -535,12 +535,6 @@ void Xwayland::handleXwaylandReady() // create selection owner for WM_S0 - magic X display number expected by XWayland m_windowManagerSelectionOwner = std::make_unique("WM_S0", kwinApp()->x11Connection(), kwinApp()->x11RootWindow()); - connect(m_windowManagerSelectionOwner.get(), &KSelectionOwner::lostOwnership, - this, &Xwayland::handleSelectionLostOwnership); - connect(m_windowManagerSelectionOwner.get(), &KSelectionOwner::claimedOwnership, - this, &Xwayland::handleSelectionClaimedOwnership); - connect(m_windowManagerSelectionOwner.get(), &KSelectionOwner::failedToClaimOwnership, - this, &Xwayland::handleSelectionFailedToClaimOwnership); m_windowManagerSelectionOwner->claim(true); m_dataBridge = std::make_unique(); @@ -548,13 +542,13 @@ void Xwayland::handleXwaylandReady() connect(workspace(), &Workspace::outputOrderChanged, this, &Xwayland::updatePrimary); updatePrimary(); - Xcb::sync(); // Trigger possible errors, there's still a chance to abort - delete m_xrandrEventsFilter; m_xrandrEventsFilter = new XrandrEventFilter(this); refreshEavesdropping(); connect(options, &Options::xwaylandEavesdropsChanged, this, &Xwayland::refreshEavesdropping); + + Q_EMIT started(); } void Xwayland::refreshEavesdropping() @@ -608,23 +602,6 @@ void Xwayland::updatePrimary() } } -void Xwayland::handleSelectionLostOwnership() -{ - qCWarning(KWIN_XWL) << "Somebody else claimed ownership of WM_S0. This should never happen!"; - m_launcher->stop(); -} - -void Xwayland::handleSelectionFailedToClaimOwnership() -{ - qCWarning(KWIN_XWL) << "Failed to claim ownership of WM_S0. This should never happen!"; - m_launcher->stop(); -} - -void Xwayland::handleSelectionClaimedOwnership() -{ - Q_EMIT started(); -} - bool Xwayland::createX11Connection() { xcb_connection_t *connection = xcb_connect_to_fd(m_launcher->xcbConnectionFd(), nullptr); diff --git a/src/xwayland/xwayland.h b/src/xwayland/xwayland.h index b3b853c356..73ceeff163 100644 --- a/src/xwayland/xwayland.h +++ b/src/xwayland/xwayland.h @@ -58,10 +58,6 @@ private Q_SLOTS: void handleXwaylandFinished(); void handleXwaylandReady(); - void handleSelectionLostOwnership(); - void handleSelectionFailedToClaimOwnership(); - void handleSelectionClaimedOwnership(); - private: friend class XrandrEventFilter;