src/plasmaquick/dialog.cpp - fix build without kwayland
This commit is contained in:
parent
0fb9732866
commit
6c03c15c08
@ -1163,11 +1163,13 @@ bool Dialog::event(QEvent *event)
|
|||||||
* and tear it down when the window gets hidden
|
* and tear it down when the window gets hidden
|
||||||
* see https://phabricator.kde.org/T6064
|
* see https://phabricator.kde.org/T6064
|
||||||
*/
|
*/
|
||||||
|
#if HAVE_KWAYLAND
|
||||||
if (!d->shellSurface) {
|
if (!d->shellSurface) {
|
||||||
KWindowSystem::setState(winId(), NET::SkipTaskbar | NET::SkipPager);
|
KWindowSystem::setState(winId(), NET::SkipTaskbar | NET::SkipPager);
|
||||||
d->setupWaylandIntegration();
|
d->setupWaylandIntegration();
|
||||||
d->updateVisibility(true);
|
d->updateVisibility(true);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
#if (QT_VERSION > QT_VERSION_CHECK(5, 5, 0))
|
#if (QT_VERSION > QT_VERSION_CHECK(5, 5, 0))
|
||||||
} else if (event->type() == QEvent::PlatformSurface) {
|
} else if (event->type() == QEvent::PlatformSurface) {
|
||||||
const QPlatformSurfaceEvent *pSEvent = static_cast<QPlatformSurfaceEvent *>(event);
|
const QPlatformSurfaceEvent *pSEvent = static_cast<QPlatformSurfaceEvent *>(event);
|
||||||
@ -1186,9 +1188,9 @@ bool Dialog::event(QEvent *event)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
} else if (event->type() == QEvent::Move) {
|
} else if (event->type() == QEvent::Move) {
|
||||||
QMoveEvent *me = static_cast<QMoveEvent *>(event);
|
|
||||||
#if HAVE_KWAYLAND
|
#if HAVE_KWAYLAND
|
||||||
if (d->shellSurface) {
|
if (d->shellSurface) {
|
||||||
|
QMoveEvent *me = static_cast<QMoveEvent *>(event);
|
||||||
d->shellSurface->setPosition(me->pos());
|
d->shellSurface->setPosition(me->pos());
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -1396,4 +1398,3 @@ void Dialog::setBackgroundHints(Dialog::BackgroundHints hints)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#include "moc_dialog.cpp"
|
#include "moc_dialog.cpp"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user