From 65ab514a2c34b2ddf3c34a9c8abac92f1e6879d3 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Wed, 8 Oct 2014 13:54:26 +0200 Subject: [PATCH] set flags again on QEvent::Expose is the only event we get we know the window will already be visible to set the flags to have actually any effect BUG:335572 Change-Id: Id1b69a894295af59a681946df9d14ff7ed316526 --- src/plasmaquick/dialog.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/plasmaquick/dialog.cpp b/src/plasmaquick/dialog.cpp index 91221e945..fc99bfc89 100644 --- a/src/plasmaquick/dialog.cpp +++ b/src/plasmaquick/dialog.cpp @@ -930,8 +930,10 @@ void Dialog::setType(WindowType type) if (type == Dock) { KWindowSystem::setOnAllDesktops(winId(), true); + KWindowSystem::setState(winId(), NET::KeepAbove); } else { KWindowSystem::setOnAllDesktops(winId(), false); + KWindowSystem::clearState(winId(), NET::KeepAbove); } emit typeChanged(); @@ -993,6 +995,19 @@ bool Dialog::event(QEvent *event) d->updateVisibility(false); } + if (event->type() == QEvent::Expose) { + KWindowSystem::setType(winId(), (NET::WindowType)d->type); + + if (d->type == Dock) { + KWindowSystem::setOnAllDesktops(winId(), true); + KWindowSystem::setState(winId(), NET::KeepAbove); + raise(); + } else { + KWindowSystem::setOnAllDesktops(winId(), false); + KWindowSystem::clearState(winId(), NET::KeepAbove); + } + } + const bool retval = QQuickWindow::event(event); if (event->type() != QEvent::DeferredDelete) { KWindowSystem::setState(winId(), NET::SkipTaskbar | NET::SkipPager);