X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/a5fb0524b575597a1e835f601e23bd2ceb9ce11b..43cc016f8b3ec48157a86815a050518a41b423b2:/src/dolphindockwidget.cpp diff --git a/src/dolphindockwidget.cpp b/src/dolphindockwidget.cpp index 930c38e35..5e79e0316 100644 --- a/src/dolphindockwidget.cpp +++ b/src/dolphindockwidget.cpp @@ -6,6 +6,7 @@ #include "dolphindockwidget.h" +#include #include namespace @@ -77,5 +78,21 @@ bool DolphinDockWidget::isLocked() const return m_locked; } +bool DolphinDockWidget::event(QEvent *event) +{ + switch (event->type()) { + case QEvent::Show: + case QEvent::Hide: + if (event->spontaneous()) { + // The Dolphin window has been minimized or restored. We do not want this to be interpreted like a user was toggling the visibility of this widget. + // We return here so no QDockWidget::visibilityChanged() signal is emitted. This does not seem to happen either way on Wayland. + return true; + } + [[fallthrough]]; + default: + return QDockWidget::event(event); + } +} + #include "dolphindockwidget.moc" #include "moc_dolphindockwidget.cpp"