mirror of
https://github.com/KDE/latte-dock.git
synced 2025-03-09 16:58:16 +03:00
avoid crash in wayland from Widgets Explorer
This commit is contained in:
parent
84d4d4cef7
commit
754fb85133
@ -273,7 +273,7 @@ void SubConfigView::setupWaylandIntegration()
|
||||
return;
|
||||
}
|
||||
|
||||
qDebug() << "wayland primary settings surface was created...";
|
||||
qDebug() << "wayland " << title() << " surface was created...";
|
||||
|
||||
m_shellSurface = interface->createSurface(s, this);
|
||||
|
||||
@ -316,7 +316,7 @@ bool SubConfigView::event(QEvent *e)
|
||||
if (m_shellSurface) {
|
||||
delete m_shellSurface;
|
||||
m_shellSurface = nullptr;
|
||||
qDebug() << "WAYLAND config window surface was deleted...";
|
||||
qDebug() << "WAYLAND " << title() << " window surface was deleted...";
|
||||
}
|
||||
|
||||
break;
|
||||
|
@ -228,12 +228,16 @@ void WidgetExplorerView::hideConfigWindow()
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_shellSurface) {
|
||||
//!NOTE: Avoid crash in wayland environment with qt5.9
|
||||
close();
|
||||
} else {
|
||||
hide();
|
||||
}
|
||||
QTimer::singleShot(100, [this]() {
|
||||
//! avoid crashes under wayland because some mouse events are sended after the surface is destroyed
|
||||
|
||||
if (m_shellSurface) {
|
||||
//!NOTE: Avoid crash in wayland environment with qt5.9
|
||||
close();
|
||||
} else {
|
||||
hide();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
void WidgetExplorerView::syncSlideEffect()
|
||||
|
Loading…
x
Reference in New Issue
Block a user