aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Edmundson <[email protected]>2017-05-17 01:31:59 +0200
committerDavid Edmundson <[email protected]>2017-05-17 01:32:25 +0200
commita0e8ddda7072f18fc50f45bb714a78496b33a774 (patch)
tree612145064dcb3507632f655803c18b705f04a290
parentc500a2769ef3bcd5986c29bb57932d68bb1e2304 (diff)
Don't create a shellSurface in every expose, only after hiding
Previous test still passes Reviewed-by: Roman
-rw-r--r--src/platformtheme/kwaylandintegration.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/platformtheme/kwaylandintegration.cpp b/src/platformtheme/kwaylandintegration.cpp
index b3a20e3..260fb37 100644
--- a/src/platformtheme/kwaylandintegration.cpp
+++ b/src/platformtheme/kwaylandintegration.cpp
@@ -80,7 +80,9 @@ bool KWaylandIntegration::eventFilter(QObject *watched, QEvent *event)
if (!w || w->parent()) {
return false;
}
- shellSurfaceCreated(w);
+ if(w->property("org.kde.plasma.integration.waylandserverdecoration").isNull()) {
+ shellSurfaceCreated(w);
+ }
} else if (event->type() == QEvent::Hide) {
QWindow *w = qobject_cast<QWindow*>(watched);
if (!w || w->parent()) {
@@ -133,7 +135,7 @@ void KWaylandIntegration::shellSurfaceCreated(QWindow *w)
void KWaylandIntegration::shellSurfaceDestroyed(QWindow *w)
{
delete w->property("org.kde.plasma.integration.waylandserverdecoration").value<ServerSideDecoration*>();
- w->setProperty("org.kde.plasma.integration.waylandserverdecoration", 0);
+ w->setProperty("org.kde.plasma.integration.waylandserverdecoration", QVariant());
}
void KWaylandIntegration::installColorScheme(QWindow *w)