Remove impossible case in PointerInputRedirection::cleanupInternalWindow()

If an internal window is hidden, the corresponding InternalClient will
be destroyed and input focus will be updated.
master
Vlad Zahorodnii 3 years ago
parent a02ca08d45
commit a93d24f4b0

@ -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)

@ -164,7 +164,6 @@ private:
QHash<uint32_t, InputRedirection::PointerButtonState> 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;

Loading…
Cancel
Save