Do not overwrite the window type by calling setFlags

QWindow::setFlags is manipulating the same X property as
KWindowSystem::setType. Thus our setType never succeeded as the
setFlags overwrote the window type again. In the same way we
have to call setFlags when reverting to the default Normal type.

REVIEW: 115258
This commit is contained in:
Martin Gräßlin 2014-01-23 13:46:01 +01:00
parent 18c4fc7c60
commit 188e421956

View File

@ -191,13 +191,16 @@ void DialogProxy::updateVisibility(bool visible)
raise();
KWindowSystem::setState(winId(), NET::SkipTaskbar | NET::SkipPager);
KWindowSystem::setType(winId(), (NET::WindowType)m_type);
if (m_type != Normal) {
KWindowSystem::setType(winId(), (NET::WindowType)m_type);
} else {
setFlags(Qt::FramelessWindowHint|flags());
}
if (m_type == Dock) {
KWindowSystem::setOnAllDesktops(winId(), true);
} else {
KWindowSystem::setOnAllDesktops(winId(), false);
}
setFlags(Qt::FramelessWindowHint|flags());
}
}
@ -394,7 +397,11 @@ void DialogProxy::setType(WindowType type)
}
m_type = type;
KWindowSystem::setType(winId(), (NET::WindowType)type);
if (m_type != Normal) {
KWindowSystem::setType(winId(), (NET::WindowType)type);
} else {
setFlags(Qt::FramelessWindowHint|flags());
}
if (type == Dock) {
KWindowSystem::setOnAllDesktops(winId(), true);