Changeset View
Changeset View
Standalone View
Standalone View
deleted.h
Show First 20 Lines • Show All 98 Lines • ▼ Show 20 Line(s) | 98 | bool keepAbove() const { | |||
---|---|---|---|---|---|
99 | return m_keepAbove; | 99 | return m_keepAbove; | ||
100 | } | 100 | } | ||
101 | bool keepBelow() const { | 101 | bool keepBelow() const { | ||
102 | return m_keepBelow; | 102 | return m_keepBelow; | ||
103 | } | 103 | } | ||
104 | QString caption() const { | 104 | QString caption() const { | ||
105 | return m_caption; | 105 | return m_caption; | ||
106 | } | 106 | } | ||
107 | | ||||
108 | /** | ||||
109 | * Returns whether the client was active. | ||||
110 | * | ||||
111 | * @returns @c true if the client was active at the time when it was closed, | ||||
112 | * @c false otherwise | ||||
113 | **/ | ||||
114 | bool wasActive() const { | ||||
115 | return m_wasActive; | ||||
116 | } | ||||
117 | | ||||
118 | /** | ||||
119 | * Returns whether this was an X11 client. | ||||
120 | * | ||||
121 | * @returns @c true if it was an X11 client, @c false otherwise. | ||||
122 | **/ | ||||
123 | bool wasX11Client() const { | ||||
124 | return m_wasX11Client; | ||||
125 | } | ||||
126 | | ||||
127 | /** | ||||
128 | * Returns whether this was a Wayland client. | ||||
129 | * | ||||
130 | * @returns @c true if it was a Wayland client, @c false otherwise. | ||||
131 | **/ | ||||
132 | bool wasWaylandClient() const { | ||||
133 | return m_wasWaylandClient; | ||||
134 | } | ||||
135 | | ||||
136 | /** | ||||
137 | * Returns whether the client was a transient. | ||||
138 | * | ||||
139 | * @returns @c true if it was a transient, @c false otherwise. | ||||
140 | **/ | ||||
141 | bool wasTransient() const { | ||||
142 | return !m_transientFor.isEmpty(); | ||||
143 | } | ||||
144 | | ||||
145 | /** | ||||
146 | * Returns whether the client was a group transient. | ||||
147 | * | ||||
148 | * @returns @c true if it was a group transient, @c false otherwise. | ||||
149 | * @note This is relevant only for X11 clients. | ||||
150 | **/ | ||||
151 | bool wasGroupTransient() const { | ||||
152 | return m_wasGroupTransient; | ||||
153 | } | ||||
154 | | ||||
155 | /** | ||||
156 | * Checks whether this client was a transient for given toplevel. | ||||
157 | * | ||||
158 | * @param toplevel Toplevel against which we are testing. | ||||
159 | * @returns @c true if it was a transient for given toplevel, @c false otherwise. | ||||
160 | **/ | ||||
161 | bool wasTransientFor(const Toplevel *toplevel) const { | ||||
162 | return m_transientFor.contains(const_cast<Toplevel *>(toplevel)); | ||||
163 | } | ||||
164 | | ||||
165 | /** | ||||
166 | * Returns the list of transients. | ||||
167 | * | ||||
168 | * Because the window is Deleted, it can have only Deleted child transients. | ||||
169 | **/ | ||||
170 | DeletedList transients() const { | ||||
171 | return m_transients; | ||||
172 | } | ||||
173 | | ||||
107 | protected: | 174 | protected: | ||
108 | virtual void debug(QDebug& stream) const; | 175 | virtual void debug(QDebug& stream) const; | ||
109 | private Q_SLOTS: | 176 | private Q_SLOTS: | ||
110 | void mainClientClosed(KWin::Toplevel *client); | 177 | void mainClientClosed(KWin::Toplevel *client); | ||
178 | void transientForClosed(Toplevel *toplevel, Deleted *deleted); | ||||
179 | | ||||
111 | private: | 180 | private: | ||
112 | Deleted(); // use create() | 181 | Deleted(); // use create() | ||
113 | void copyToDeleted(Toplevel* c); | 182 | void copyToDeleted(Toplevel* c); | ||
114 | virtual ~Deleted(); // deleted only using unrefWindow() | 183 | virtual ~Deleted(); // deleted only using unrefWindow() | ||
184 | | ||||
185 | void addTransient(Deleted *transient); | ||||
186 | void removeTransient(Deleted *transient); | ||||
187 | void addTransientFor(AbstractClient *parent); | ||||
188 | void removeTransientFor(Deleted *parent); | ||||
189 | | ||||
115 | int delete_refcount; | 190 | int delete_refcount; | ||
116 | double window_opacity; | 191 | double window_opacity; | ||
117 | int desk; | 192 | int desk; | ||
118 | QStringList activityList; | 193 | QStringList activityList; | ||
119 | QRect contentsRect; // for clientPos()/clientSize() | 194 | QRect contentsRect; // for clientPos()/clientSize() | ||
120 | QPoint m_contentPos; | 195 | QPoint m_contentPos; | ||
121 | QRect transparent_rect; | 196 | QRect transparent_rect; | ||
122 | xcb_window_t m_frame; | 197 | xcb_window_t m_frame; | ||
Show All 12 Lines | |||||
135 | Decoration::Renderer *m_decorationRenderer; | 210 | Decoration::Renderer *m_decorationRenderer; | ||
136 | double m_opacity; | 211 | double m_opacity; | ||
137 | NET::WindowType m_type = NET::Unknown; | 212 | NET::WindowType m_type = NET::Unknown; | ||
138 | QByteArray m_windowRole; | 213 | QByteArray m_windowRole; | ||
139 | bool m_fullscreen; | 214 | bool m_fullscreen; | ||
140 | bool m_keepAbove; | 215 | bool m_keepAbove; | ||
141 | bool m_keepBelow; | 216 | bool m_keepBelow; | ||
142 | QString m_caption; | 217 | QString m_caption; | ||
218 | bool m_wasActive; | ||||
219 | bool m_wasX11Client; | ||||
220 | bool m_wasWaylandClient; | ||||
221 | bool m_wasGroupTransient; | ||||
222 | ToplevelList m_transientFor; | ||||
223 | DeletedList m_transients; | ||||
143 | }; | 224 | }; | ||
144 | 225 | | |||
145 | inline void Deleted::refWindow() | 226 | inline void Deleted::refWindow() | ||
146 | { | 227 | { | ||
147 | ++delete_refcount; | 228 | ++delete_refcount; | ||
148 | } | 229 | } | ||
149 | 230 | | |||
150 | } // namespace | 231 | } // namespace | ||
151 | 232 | | |||
152 | Q_DECLARE_METATYPE(KWin::Deleted*) | 233 | Q_DECLARE_METATYPE(KWin::Deleted*) | ||
153 | 234 | | |||
154 | #endif | 235 | #endif |