From 3cb84383995664ca37d5e56fe70a05f098391f44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Thu, 8 Oct 2015 11:04:06 +0200 Subject: [PATCH] [wayland] Keep transient state directly in ShellClient So far we delegated to ShellSurfaceInterface, but it's possible that we call into isTransient when the ShellSurfaceInterface is already destroyed. --- shell_client.cpp | 3 ++- shell_client.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/shell_client.cpp b/shell_client.cpp index e834514ed3..fc3f98c737 100644 --- a/shell_client.cpp +++ b/shell_client.cpp @@ -730,7 +730,7 @@ void ShellClient::updateIcon() bool ShellClient::isTransient() const { - return m_shellSurface->isTransient(); + return m_transient; } void ShellClient::setTransient() @@ -746,6 +746,7 @@ void ShellClient::setTransient() t->addTransient(this); } } + m_transient = !s.isNull(); } bool ShellClient::hasTransientPlacementHint() const diff --git a/shell_client.h b/shell_client.h index 5d9461cdb3..3adeaacf6d 100644 --- a/shell_client.h +++ b/shell_client.h @@ -151,6 +151,7 @@ private: QPointer m_plasmaShellSurface; QPointer m_qtExtendedSurface; bool m_fullScreen = false; + bool m_transient = false; }; }