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
This commit is contained in:
Marco Martin 2014-10-08 13:54:26 +02:00
parent cbe50c408b
commit 65ab514a2c

View File

@ -930,8 +930,10 @@ void Dialog::setType(WindowType type)
if (type == Dock) { if (type == Dock) {
KWindowSystem::setOnAllDesktops(winId(), true); KWindowSystem::setOnAllDesktops(winId(), true);
KWindowSystem::setState(winId(), NET::KeepAbove);
} else { } else {
KWindowSystem::setOnAllDesktops(winId(), false); KWindowSystem::setOnAllDesktops(winId(), false);
KWindowSystem::clearState(winId(), NET::KeepAbove);
} }
emit typeChanged(); emit typeChanged();
@ -993,6 +995,19 @@ bool Dialog::event(QEvent *event)
d->updateVisibility(false); 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); const bool retval = QQuickWindow::event(event);
if (event->type() != QEvent::DeferredDelete) { if (event->type() != QEvent::DeferredDelete) {
KWindowSystem::setState(winId(), NET::SkipTaskbar | NET::SkipPager); KWindowSystem::setState(winId(), NET::SkipTaskbar | NET::SkipPager);