Be sure isCurrentTab returns true

REVIEW: 127985

Signed-off-by: Anthony Fieroni <bvbfan@abv.bg>
This commit is contained in:
Anthony Fieroni 2016-06-01 20:46:35 +03:00
parent 6cd0d5a54a
commit c3cd8df795
3 changed files with 9 additions and 1 deletions

View file

@ -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();
}
}

View file

@ -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<AbstractClient*> m_mainClients;
bool m_wasClient;
bool m_wasCurrentTab;
Decoration::Renderer *m_decorationRenderer;
double m_opacity;
NET::WindowType m_type = NET::Unknown;

View file

@ -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)