Changeset View
Changeset View
Standalone View
Standalone View
deleted.h
Show All 35 Lines | |||||
36 | class KWIN_EXPORT Deleted | 36 | class KWIN_EXPORT Deleted | ||
37 | : public Toplevel | 37 | : public Toplevel | ||
38 | { | 38 | { | ||
39 | Q_OBJECT | 39 | Q_OBJECT | ||
40 | Q_PROPERTY(bool minimized READ isMinimized) | 40 | Q_PROPERTY(bool minimized READ isMinimized) | ||
41 | Q_PROPERTY(bool modal READ isModal) | 41 | Q_PROPERTY(bool modal READ isModal) | ||
42 | Q_PROPERTY(bool fullScreen READ isFullScreen CONSTANT) | 42 | Q_PROPERTY(bool fullScreen READ isFullScreen CONSTANT) | ||
43 | Q_PROPERTY(bool isCurrentTab READ isCurrentTab) | 43 | Q_PROPERTY(bool isCurrentTab READ isCurrentTab) | ||
44 | Q_PROPERTY(bool keepAbove READ keepAbove CONSTANT) | ||||
45 | Q_PROPERTY(bool keepBelow READ keepBelow CONSTANT) | ||||
46 | Q_PROPERTY(QString caption READ caption CONSTANT) | ||||
44 | public: | 47 | public: | ||
45 | static Deleted* create(Toplevel* c); | 48 | static Deleted* create(Toplevel* c); | ||
46 | // used by effects to keep the window around for e.g. fadeout effects when it's destroyed | 49 | // used by effects to keep the window around for e.g. fadeout effects when it's destroyed | ||
47 | void refWindow(); | 50 | void refWindow(); | ||
48 | void unrefWindow(); | 51 | void unrefWindow(); | ||
49 | void discard(); | 52 | void discard(); | ||
50 | virtual int desktop() const; | 53 | virtual int desktop() const; | ||
51 | virtual QStringList activities() const; | 54 | virtual QStringList activities() const; | ||
Show All 35 Lines | |||||
87 | 90 | | |||
88 | bool isFullScreen() const { | 91 | bool isFullScreen() const { | ||
89 | return m_fullscreen; | 92 | return m_fullscreen; | ||
90 | } | 93 | } | ||
91 | 94 | | |||
92 | bool isCurrentTab() const { | 95 | bool isCurrentTab() const { | ||
93 | return m_wasCurrentTab; | 96 | return m_wasCurrentTab; | ||
94 | } | 97 | } | ||
98 | bool keepAbove() const { | ||||
99 | return m_keepAbove; | ||||
100 | } | ||||
101 | bool keepBelow() const { | ||||
102 | return m_keepBelow; | ||||
103 | } | ||||
104 | QString caption() const { | ||||
105 | return m_caption; | ||||
106 | } | ||||
95 | protected: | 107 | protected: | ||
96 | virtual void debug(QDebug& stream) const; | 108 | virtual void debug(QDebug& stream) const; | ||
97 | private Q_SLOTS: | 109 | private Q_SLOTS: | ||
98 | void mainClientClosed(KWin::Toplevel *client); | 110 | void mainClientClosed(KWin::Toplevel *client); | ||
99 | private: | 111 | private: | ||
100 | Deleted(); // use create() | 112 | Deleted(); // use create() | ||
101 | void copyToDeleted(Toplevel* c); | 113 | void copyToDeleted(Toplevel* c); | ||
102 | virtual ~Deleted(); // deleted only using unrefWindow() | 114 | virtual ~Deleted(); // deleted only using unrefWindow() | ||
Show All 17 Lines | |||||
120 | QList<AbstractClient*> m_mainClients; | 132 | QList<AbstractClient*> m_mainClients; | ||
121 | bool m_wasClient; | 133 | bool m_wasClient; | ||
122 | bool m_wasCurrentTab; | 134 | bool m_wasCurrentTab; | ||
123 | Decoration::Renderer *m_decorationRenderer; | 135 | Decoration::Renderer *m_decorationRenderer; | ||
124 | double m_opacity; | 136 | double m_opacity; | ||
125 | NET::WindowType m_type = NET::Unknown; | 137 | NET::WindowType m_type = NET::Unknown; | ||
126 | QByteArray m_windowRole; | 138 | QByteArray m_windowRole; | ||
127 | bool m_fullscreen; | 139 | bool m_fullscreen; | ||
140 | bool m_keepAbove; | ||||
141 | bool m_keepBelow; | ||||
142 | QString m_caption; | ||||
128 | }; | 143 | }; | ||
129 | 144 | | |||
130 | inline void Deleted::refWindow() | 145 | inline void Deleted::refWindow() | ||
131 | { | 146 | { | ||
132 | ++delete_refcount; | 147 | ++delete_refcount; | ||
133 | } | 148 | } | ||
134 | 149 | | |||
135 | } // namespace | 150 | } // namespace | ||
136 | 151 | | |||
137 | Q_DECLARE_METATYPE(KWin::Deleted*) | 152 | Q_DECLARE_METATYPE(KWin::Deleted*) | ||
138 | 153 | | |||
139 | #endif | 154 | #endif |