From a93d24f4b0d87bf1d5c13f66f3108681fb65de3f Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Mon, 29 Nov 2021 18:54:46 +0200 Subject: [PATCH] Remove impossible case in PointerInputRedirection::cleanupInternalWindow() If an internal window is hidden, the corresponding InternalClient will be destroyed and input focus will be updated. --- src/pointer_input.cpp | 15 --------------- src/pointer_input.h | 1 - 2 files changed, 16 deletions(-) diff --git a/src/pointer_input.cpp b/src/pointer_input.cpp index 12a8e6186e..657f6f6073 100644 --- a/src/pointer_input.cpp +++ b/src/pointer_input.cpp @@ -187,8 +187,6 @@ void PointerInputRedirection::updateOnStartMoveResize() void PointerInputRedirection::updateToReset() { if (internalWindow()) { - disconnect(m_internalWindowConnection); - m_internalWindowConnection = QMetaObject::Connection(); QEvent event(QEvent::Leave); QCoreApplication::sendEvent(internalWindow(), &event); setInternalWindow(nullptr); @@ -514,24 +512,11 @@ bool PointerInputRedirection::focusUpdatesBlocked() void PointerInputRedirection::cleanupInternalWindow(QWindow *old, QWindow *now) { - disconnect(m_internalWindowConnection); - m_internalWindowConnection = QMetaObject::Connection(); - if (old) { // leave internal window QEvent leaveEvent(QEvent::Leave); QCoreApplication::sendEvent(old, &leaveEvent); } - - if (now) { - m_internalWindowConnection = connect(internalWindow(), &QWindow::visibleChanged, this, - [this] (bool visible) { - if (!visible) { - update(); - } - } - ); - } } void PointerInputRedirection::cleanupDecoration(Decoration::DecoratedClientImpl *old, Decoration::DecoratedClientImpl *now) diff --git a/src/pointer_input.h b/src/pointer_input.h index c432d6541e..b20622091e 100644 --- a/src/pointer_input.h +++ b/src/pointer_input.h @@ -164,7 +164,6 @@ private: QHash m_buttons; Qt::MouseButtons m_qtButtons; QMetaObject::Connection m_focusGeometryConnection; - QMetaObject::Connection m_internalWindowConnection; QMetaObject::Connection m_constraintsConnection; QMetaObject::Connection m_constraintsActivatedConnection; QMetaObject::Connection m_confinedPointerRegionConnection;