fix crash from ghostedge in X11

--when unloading a layout under X11
when MultipleLayouts are used sometimes
a crash was occuring.
pull/2/head
Michail Vourlakos 7 years ago
parent dd296cdf9c
commit a87d094986

@ -62,15 +62,16 @@ ScreenEdgeGhostWindow::ScreenEdgeGhostWindow(DockView *view) :
connect(this, &QWindow::visibleChanged, this, [&]() { connect(this, &QWindow::visibleChanged, this, [&]() {
//! IMPORTANT!!! ::: This fixes a bug when closing an Activity all docks from all Activities are //! IMPORTANT!!! ::: This fixes a bug when closing an Activity all docks from all Activities are
//! disappearing! With this they reappear!!! //! disappearing! With this they reappear!!!
if (m_dockView && m_dockView->managedLayout()) {
if (!isVisible()) { if (!isVisible()) {
QTimer::singleShot(100, [this]() { QTimer::singleShot(100, [this]() {
if (!m_inDelete && !isVisible()) { if (!m_inDelete && !isVisible() && m_dockView && m_dockView->managedLayout()) {
setVisible(true); setVisible(true);
} }
}); });
QTimer::singleShot(1500, [this]() { QTimer::singleShot(1500, [this]() {
if (!m_inDelete && !isVisible()) { if (!m_inDelete && !isVisible() && m_dockView && m_dockView->managedLayout()) {
setVisible(true); setVisible(true);
} }
}); });
@ -83,6 +84,7 @@ ScreenEdgeGhostWindow::ScreenEdgeGhostWindow(DockView *view) :
KWindowSystem::setOnAllDesktops(winId(), true); KWindowSystem::setOnAllDesktops(winId(), true);
} }
} }
}
}); });
} }

Loading…
Cancel
Save