176 using Chain = QList<Window *>;
187 void makeFirstInChain(
Window *window, Chain &chain);
198 void makeLastInChain(
Window *window, Chain &chain);
199 void moveAfterWindowInChain(
Window *window,
Window *reference, Chain &chain);
200 void updateWindowInChain(
Window *window,
Change change, Chain &chain);
201 void insertWindowIntoChain(
Window *window, Chain &chain);
202 Chain m_mostRecentlyUsed;
203 QHash<VirtualDesktop *, Chain> m_desktopFocusChains;
204 bool m_separateScreenFocus =
false;
205 Window *m_activeWindow =
nullptr;
211 return m_mostRecentlyUsed.contains(window);
216 m_separateScreenFocus = enabled;
221 m_activeWindow = window;
226 m_currentDesktop = desktop;
Singleton class to handle the various focus chains.
Window * getForActivation(VirtualDesktop *desktop) const
Finds the best Window to become the new active Window in the focus chain for the given virtual deskto...
void removeDesktop(VirtualDesktop *desktop)
void moveAfterWindow(Window *window, Window *reference)
Moves window behind the reference Window in all focus chains.
void remove(KWin::Window *window)
Removes window from all focus chains.
void update(Window *window, Change change)
Updates the position of the window according to the requested change in the focus chain.
void addDesktop(VirtualDesktop *desktop)
void setCurrentDesktop(VirtualDesktop *desktop)
Window * nextForDesktop(Window *reference, VirtualDesktop *desktop) const
Queries the focus chain for desktop for the next Window in relation to the given reference Window.
bool contains(Window *window) const
Checks whether the most recently used focus chain contains the given window.
bool isUsableFocusCandidate(Window *window, Window *prev) const
Window * firstMostRecentlyUsed() const
Returns the first Window in the most recently used focus chain. First Window in this case means reall...
Window * nextMostRecentlyUsed(Window *reference) const
Queries the most recently used focus chain for the next Window after the given reference Window.
void setActiveWindow(KWin::Window *window)
void setSeparateScreenFocus(bool enabled)