From c3cd8df7954f4b136deb67a763103ce333bc0468 Mon Sep 17 00:00:00 2001 From: Anthony Fieroni Date: Wed, 1 Jun 2016 20:46:35 +0300 Subject: [PATCH] Be sure isCurrentTab returns true REVIEW: 127985 Signed-off-by: Anthony Fieroni --- deleted.cpp | 2 ++ deleted.h | 6 ++++++ libkwineffects/kwineffects.cpp | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/deleted.cpp b/deleted.cpp index 5e0225f593..61b8dbd82e 100644 --- a/deleted.cpp +++ b/deleted.cpp @@ -41,6 +41,7 @@ Deleted::Deleted() , m_minimized(false) , m_modal(false) , m_wasClient(false) + , m_wasCurrentTab(true) , m_decorationRenderer(nullptr) , m_fullscreen(false) { @@ -110,6 +111,7 @@ void Deleted::copyToDeleted(Toplevel* c) connect(c, &AbstractClient::windowClosed, this, &Deleted::mainClientClosed); } m_fullscreen = client->isFullScreen(); + m_wasCurrentTab = client->isCurrentTab(); } } diff --git a/deleted.h b/deleted.h index b89c961ef1..70af56f80a 100644 --- a/deleted.h +++ b/deleted.h @@ -40,6 +40,7 @@ class KWIN_EXPORT Deleted Q_PROPERTY(bool minimized READ isMinimized) Q_PROPERTY(bool modal READ isModal) Q_PROPERTY(bool fullScreen READ isFullScreen CONSTANT) + Q_PROPERTY(bool isCurrentTab READ isCurrentTab) public: static Deleted* create(Toplevel* c); // used by effects to keep the window around for e.g. fadeout effects when it's destroyed @@ -87,6 +88,10 @@ public: bool isFullScreen() const { return m_fullscreen; } + + bool isCurrentTab() const { + return m_wasCurrentTab; + } protected: virtual void debug(QDebug& stream) const; virtual bool shouldUnredirect() const; @@ -115,6 +120,7 @@ private: bool m_modal; QList m_mainClients; bool m_wasClient; + bool m_wasCurrentTab; Decoration::Renderer *m_decorationRenderer; double m_opacity; NET::WindowType m_type = NET::Unknown; diff --git a/libkwineffects/kwineffects.cpp b/libkwineffects/kwineffects.cpp index 206afa314f..b1d8f5dc88 100644 --- a/libkwineffects/kwineffects.cpp +++ b/libkwineffects/kwineffects.cpp @@ -837,7 +837,7 @@ WINDOW_HELPER_DEFAULT(bool, isSpecialWindow, "specialWindow", true) WINDOW_HELPER_DEFAULT(bool, acceptsFocus, "wantsInput", true) // We don't actually know... WINDOW_HELPER_DEFAULT(QIcon, icon, "icon", QIcon()) WINDOW_HELPER_DEFAULT(bool, isSkipSwitcher, "skipSwitcher", false) -WINDOW_HELPER_DEFAULT(bool, isCurrentTab, "isCurrentTab", false) +WINDOW_HELPER_DEFAULT(bool, isCurrentTab, "isCurrentTab", true) WINDOW_HELPER_DEFAULT(bool, decorationHasAlpha, "decorationHasAlpha", false) WINDOW_HELPER_DEFAULT(bool, isFullScreen, "fullScreen", false)