Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion frame/layershell/x11dlayershellemulation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ void LayerShellEmulation::onPositionChanged()
void LayerShellEmulation::onExclusionZoneChanged()
{
// dde-shell issues:379
if (m_dlayerShellWindow->exclusionZone() <= 0)
if (m_dlayerShellWindow->exclusionZone() < 0)
return;
auto scaleFactor = qGuiApp->devicePixelRatio();
auto *x11Application = qGuiApp->nativeInterface<QNativeInterface::QX11Application>();
Expand Down
21 changes: 20 additions & 1 deletion panels/dock/dockhelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,24 @@ bool DockHelper::eventFilter(QObject *watched, QEvent *event)
m_hideTimer->start();
break;
}

case QEvent::Show: {
// if the dock's subwindow is show, the dock is not hidden
if (window->transientParent() != NULL &&
topTransientParent == parent()->rootObject()) {
m_transientChildShows.insert(window, true);
if (m_hideTimer->isActive()) {
m_hideTimer->stop();
}
}
break;
}
case QEvent::Hide: {
m_enters.remove(window);
if (window->transientParent() != NULL &&
topTransientParent == parent()->rootObject()) {
m_transientChildShows.remove(window);
m_hideTimer->start();
}
break;
}
default: {
Expand Down Expand Up @@ -184,6 +199,10 @@ void DockHelper::checkNeedHideOrNot()
needHide &= !enter;
}

for (auto show : m_transientChildShows) {
needHide &= !show;
}

if (needHide)
parent()->setHideState(Hide);
}
Expand Down
1 change: 1 addition & 0 deletions panels/dock/dockhelper.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ private Q_SLOTS:
private:
QHash<QScreen *, DockWakeUpArea *> m_areas;
QHash<QWindow *, bool> m_enters;
QHash<QWindow *, bool> m_transientChildShows;
QTimer *m_hideTimer;
QTimer *m_showTimer;
};
Expand Down