Changeset View
Changeset View
Standalone View
Standalone View
focuschain.h
Show First 20 Lines • Show All 183 Lines • ▼ Show 20 Line(s) | 168 | public Q_SLOTS: | |||
---|---|---|---|---|---|
184 | **/ | 184 | **/ | ||
185 | void remove(KWin::AbstractClient *client); | 185 | void remove(KWin::AbstractClient *client); | ||
186 | void setSeparateScreenFocus(bool enabled); | 186 | void setSeparateScreenFocus(bool enabled); | ||
187 | void setActiveClient(KWin::AbstractClient *client); | 187 | void setActiveClient(KWin::AbstractClient *client); | ||
188 | void setCurrentDesktop(uint previous, uint newDesktop); | 188 | void setCurrentDesktop(uint previous, uint newDesktop); | ||
189 | bool isUsableFocusCandidate(AbstractClient *c, AbstractClient *prev) const; | 189 | bool isUsableFocusCandidate(AbstractClient *c, AbstractClient *prev) const; | ||
190 | 190 | | |||
191 | private: | 191 | private: | ||
192 | using Chain = QList<AbstractClient*>; | ||||
192 | /** | 193 | /** | ||
193 | * @brief Makes @p client the first Client in the given focus @p chain. | 194 | * @brief Makes @p client the first Client in the given focus @p chain. | ||
194 | * | 195 | * | ||
195 | * This means the existing position of @p client is dropped and @p client is appended to the | 196 | * This means the existing position of @p client is dropped and @p client is appended to the | ||
196 | * @p chain which makes it the first item. | 197 | * @p chain which makes it the first item. | ||
197 | * | 198 | * | ||
198 | * @param client The Client to become the first in @p chain | 199 | * @param client The Client to become the first in @p chain | ||
199 | * @param chain The focus chain to operate on | 200 | * @param chain The focus chain to operate on | ||
200 | * @return void | 201 | * @return void | ||
201 | **/ | 202 | **/ | ||
202 | void makeFirstInChain(AbstractClient *client, QList<AbstractClient*> &chain); | 203 | void makeFirstInChain(AbstractClient *client, Chain &chain); | ||
203 | /** | 204 | /** | ||
204 | * @brief Makes @p client the last Client in the given focus @p chain. | 205 | * @brief Makes @p client the last Client in the given focus @p chain. | ||
205 | * | 206 | * | ||
206 | * This means the existing position of @p client is dropped and @p client is prepended to the | 207 | * This means the existing position of @p client is dropped and @p client is prepended to the | ||
207 | * @p chain which makes it the last item. | 208 | * @p chain which makes it the last item. | ||
208 | * | 209 | * | ||
209 | * @param client The Client to become the last in @p chain | 210 | * @param client The Client to become the last in @p chain | ||
210 | * @param chain The focus chain to operate on | 211 | * @param chain The focus chain to operate on | ||
211 | * @return void | 212 | * @return void | ||
212 | **/ | 213 | **/ | ||
213 | void makeLastInChain(AbstractClient *client, QList<AbstractClient*> &chain); | 214 | void makeLastInChain(AbstractClient *client, Chain &chain); | ||
214 | void moveAfterClientInChain(AbstractClient *client, AbstractClient *reference, QList<AbstractClient*> &chain); | 215 | void moveAfterClientInChain(AbstractClient *client, AbstractClient *reference, Chain &chain); | ||
215 | void updateClientInChain(AbstractClient *client, Change change, QList<AbstractClient*> &chain); | 216 | void updateClientInChain(AbstractClient *client, Change change, Chain &chain); | ||
216 | void insertClientIntoChain(AbstractClient *client, QList<AbstractClient*> &chain); | 217 | void insertClientIntoChain(AbstractClient *client, Chain &chain); | ||
217 | typedef QHash<uint, QList<AbstractClient*> > DesktopChains; | 218 | Chain m_mostRecentlyUsed; | ||
218 | QList<AbstractClient*> m_mostRecentlyUsed; | 219 | QHash<uint, Chain> m_desktopFocusChains; | ||
219 | DesktopChains m_desktopFocusChains; | | |||
220 | bool m_separateScreenFocus; | 220 | bool m_separateScreenFocus; | ||
221 | AbstractClient *m_activeClient; | 221 | AbstractClient *m_activeClient; | ||
222 | uint m_currentDesktop; | 222 | uint m_currentDesktop; | ||
223 | 223 | | |||
224 | KWIN_SINGLETON_VARIABLE(FocusChain, s_manager) | 224 | KWIN_SINGLETON_VARIABLE(FocusChain, s_manager) | ||
225 | }; | 225 | }; | ||
226 | 226 | | |||
227 | inline | 227 | inline | ||
Show All 27 Lines |