Merge branch 'Plasma/5.6'

This commit is contained in:
Martin Gräßlin 2016-06-02 08:54:02 +02:00
commit 81b81f43df
3 changed files with 9 additions and 1 deletions

View file

@ -41,6 +41,7 @@ Deleted::Deleted()
, m_minimized(false) , m_minimized(false)
, m_modal(false) , m_modal(false)
, m_wasClient(false) , m_wasClient(false)
, m_wasCurrentTab(true)
, m_decorationRenderer(nullptr) , m_decorationRenderer(nullptr)
, m_fullscreen(false) , m_fullscreen(false)
{ {
@ -110,6 +111,7 @@ void Deleted::copyToDeleted(Toplevel* c)
connect(c, &AbstractClient::windowClosed, this, &Deleted::mainClientClosed); connect(c, &AbstractClient::windowClosed, this, &Deleted::mainClientClosed);
} }
m_fullscreen = client->isFullScreen(); 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 minimized READ isMinimized)
Q_PROPERTY(bool modal READ isModal) Q_PROPERTY(bool modal READ isModal)
Q_PROPERTY(bool fullScreen READ isFullScreen CONSTANT) Q_PROPERTY(bool fullScreen READ isFullScreen CONSTANT)
Q_PROPERTY(bool isCurrentTab READ isCurrentTab)
public: public:
static Deleted* create(Toplevel* c); static Deleted* create(Toplevel* c);
// used by effects to keep the window around for e.g. fadeout effects when it's destroyed // 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 { bool isFullScreen() const {
return m_fullscreen; return m_fullscreen;
} }
bool isCurrentTab() const {
return m_wasCurrentTab;
}
protected: protected:
virtual void debug(QDebug& stream) const; virtual void debug(QDebug& stream) const;
virtual bool shouldUnredirect() const; virtual bool shouldUnredirect() const;
@ -115,6 +120,7 @@ private:
bool m_modal; bool m_modal;
QList<AbstractClient*> m_mainClients; QList<AbstractClient*> m_mainClients;
bool m_wasClient; bool m_wasClient;
bool m_wasCurrentTab;
Decoration::Renderer *m_decorationRenderer; Decoration::Renderer *m_decorationRenderer;
double m_opacity; double m_opacity;
NET::WindowType m_type = NET::Unknown; 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(bool, acceptsFocus, "wantsInput", true) // We don't actually know...
WINDOW_HELPER_DEFAULT(QIcon, icon, "icon", QIcon()) WINDOW_HELPER_DEFAULT(QIcon, icon, "icon", QIcon())
WINDOW_HELPER_DEFAULT(bool, isSkipSwitcher, "skipSwitcher", false) 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, decorationHasAlpha, "decorationHasAlpha", false)
WINDOW_HELPER_DEFAULT(bool, isFullScreen, "fullScreen", false) WINDOW_HELPER_DEFAULT(bool, isFullScreen, "fullScreen", false)