Changeset View
Changeset View
Standalone View
Standalone View
workspace.h
Show First 20 Lines • Show All 201 Lines • ▼ Show 20 Line(s) | 67 | public: | |||
---|---|---|---|---|---|
202 | void forceRestacking(); | 202 | void forceRestacking(); | ||
203 | 203 | | |||
204 | void clientHidden(AbstractClient*); | 204 | void clientHidden(AbstractClient*); | ||
205 | void clientAttentionChanged(AbstractClient* c, bool set); | 205 | void clientAttentionChanged(AbstractClient* c, bool set); | ||
206 | 206 | | |||
207 | /** | 207 | /** | ||
208 | * @return List of clients currently managed by Workspace | 208 | * @return List of clients currently managed by Workspace | ||
209 | */ | 209 | */ | ||
210 | const ClientList &clientList() const { | 210 | const QList<X11Client *> &clientList() const { | ||
211 | return clients; | 211 | return clients; | ||
212 | } | 212 | } | ||
213 | /** | 213 | /** | ||
214 | * @return List of unmanaged "clients" currently registered in Workspace | 214 | * @return List of unmanaged "clients" currently registered in Workspace | ||
215 | */ | 215 | */ | ||
216 | const UnmanagedList &unmanagedList() const { | 216 | const QList<Unmanaged *> &unmanagedList() const { | ||
217 | return unmanaged; | 217 | return unmanaged; | ||
218 | } | 218 | } | ||
219 | /** | 219 | /** | ||
220 | * @return List of desktop "clients" currently managed by Workspace | 220 | * @return List of desktop "clients" currently managed by Workspace | ||
221 | */ | 221 | */ | ||
222 | const ClientList &desktopList() const { | 222 | const QList<X11Client *> &desktopList() const { | ||
223 | return desktops; | 223 | return desktops; | ||
224 | } | 224 | } | ||
225 | /** | 225 | /** | ||
226 | * @return List of deleted "clients" currently managed by Workspace | 226 | * @return List of deleted "clients" currently managed by Workspace | ||
227 | */ | 227 | */ | ||
228 | const DeletedList &deletedList() const { | 228 | const QList<Deleted *> &deletedList() const { | ||
229 | return deleted; | 229 | return deleted; | ||
230 | } | 230 | } | ||
231 | /** | 231 | /** | ||
232 | * @returns List of all clients (either X11 or Wayland) currently managed by Workspace | 232 | * @returns List of all clients (either X11 or Wayland) currently managed by Workspace | ||
233 | */ | 233 | */ | ||
234 | const QList<AbstractClient*> allClientList() const { | 234 | const QList<AbstractClient*> allClientList() const { | ||
235 | return m_allClients; | 235 | return m_allClients; | ||
236 | } | 236 | } | ||
Show All 27 Lines | 258 | public: | |||
264 | QVector< QRect > previousScreenSizes() const; | 264 | QVector< QRect > previousScreenSizes() const; | ||
265 | int oldDisplayWidth() const; | 265 | int oldDisplayWidth() const; | ||
266 | int oldDisplayHeight() const; | 266 | int oldDisplayHeight() const; | ||
267 | 267 | | |||
268 | /** | 268 | /** | ||
269 | * Returns the list of clients sorted in stacking order, with topmost client | 269 | * Returns the list of clients sorted in stacking order, with topmost client | ||
270 | * at the last position | 270 | * at the last position | ||
271 | */ | 271 | */ | ||
272 | const ToplevelList& stackingOrder() const; | 272 | const QList<Toplevel *> &stackingOrder() const; | ||
273 | ToplevelList xStackingOrder() const; | 273 | QList<Toplevel *> xStackingOrder() const; | ||
274 | ClientList ensureStackingOrder(const ClientList& clients) const; | 274 | QList<X11Client *> ensureStackingOrder(const QList<X11Client *> &clients) const; | ||
275 | QList<AbstractClient*> ensureStackingOrder(const QList<AbstractClient*> &clients) const; | 275 | QList<AbstractClient*> ensureStackingOrder(const QList<AbstractClient*> &clients) const; | ||
276 | 276 | | |||
277 | AbstractClient* topClientOnDesktop(int desktop, int screen, bool unconstrained = false, | 277 | AbstractClient* topClientOnDesktop(int desktop, int screen, bool unconstrained = false, | ||
278 | bool only_normal = true) const; | 278 | bool only_normal = true) const; | ||
279 | AbstractClient* findDesktop(bool topmost, int desktop) const; | 279 | AbstractClient* findDesktop(bool topmost, int desktop) const; | ||
280 | void sendClientToDesktop(AbstractClient* c, int desktop, bool dont_activate); | 280 | void sendClientToDesktop(AbstractClient* c, int desktop, bool dont_activate); | ||
281 | void windowToPreviousDesktop(AbstractClient* c); | 281 | void windowToPreviousDesktop(AbstractClient* c); | ||
282 | void windowToNextDesktop(AbstractClient* c); | 282 | void windowToNextDesktop(AbstractClient* c); | ||
▲ Show 20 Lines • Show All 254 Lines • ▼ Show 20 Line(s) | 532 | private: | |||
537 | void initShortcut(const QString &actionName, const QString &description, const QKeySequence &shortcut, | 537 | void initShortcut(const QString &actionName, const QString &description, const QKeySequence &shortcut, | ||
538 | Slot slot, const QVariant &data = QVariant()); | 538 | Slot slot, const QVariant &data = QVariant()); | ||
539 | template <typename T, typename Slot> | 539 | template <typename T, typename Slot> | ||
540 | void initShortcut(const QString &actionName, const QString &description, const QKeySequence &shortcut, T *receiver, Slot slot, const QVariant &data = QVariant()); | 540 | void initShortcut(const QString &actionName, const QString &description, const QKeySequence &shortcut, T *receiver, Slot slot, const QVariant &data = QVariant()); | ||
541 | void setupWindowShortcut(AbstractClient* c); | 541 | void setupWindowShortcut(AbstractClient* c); | ||
542 | bool switchWindow(AbstractClient *c, Direction direction, QPoint curPos, int desktop); | 542 | bool switchWindow(AbstractClient *c, Direction direction, QPoint curPos, int desktop); | ||
543 | 543 | | |||
544 | void propagateClients(bool propagate_new_clients); // Called only from updateStackingOrder | 544 | void propagateClients(bool propagate_new_clients); // Called only from updateStackingOrder | ||
545 | ToplevelList constrainedStackingOrder(); | 545 | QList<Toplevel *> constrainedStackingOrder(); | ||
546 | void raiseClientWithinApplication(AbstractClient* c); | 546 | void raiseClientWithinApplication(AbstractClient* c); | ||
547 | void lowerClientWithinApplication(AbstractClient* c); | 547 | void lowerClientWithinApplication(AbstractClient* c); | ||
548 | bool allowFullClientRaising(const AbstractClient* c, xcb_timestamp_t timestamp); | 548 | bool allowFullClientRaising(const AbstractClient* c, xcb_timestamp_t timestamp); | ||
549 | bool keepTransientAbove(const AbstractClient* mainwindow, const AbstractClient* transient); | 549 | bool keepTransientAbove(const AbstractClient* mainwindow, const AbstractClient* transient); | ||
550 | bool keepDeletedTransientAbove(const Toplevel *mainWindow, const Deleted *transient) const; | 550 | bool keepDeletedTransientAbove(const Toplevel *mainWindow, const Deleted *transient) const; | ||
551 | void blockStackingUpdates(bool block); | 551 | void blockStackingUpdates(bool block); | ||
552 | void updateToolWindows(bool also_hide); | 552 | void updateToolWindows(bool also_hide); | ||
553 | void fixPositionAfterCrash(xcb_window_t w, const xcb_get_geometry_reply_t *geom); | 553 | void fixPositionAfterCrash(xcb_window_t w, const xcb_get_geometry_reply_t *geom); | ||
Show All 32 Lines | |||||
586 | AbstractClient* most_recently_raised; // Used ONLY by raiseOrLowerClient() | 586 | AbstractClient* most_recently_raised; // Used ONLY by raiseOrLowerClient() | ||
587 | AbstractClient* movingClient; | 587 | AbstractClient* movingClient; | ||
588 | 588 | | |||
589 | // Delay(ed) window focus timer and client | 589 | // Delay(ed) window focus timer and client | ||
590 | QTimer* delayFocusTimer; | 590 | QTimer* delayFocusTimer; | ||
591 | AbstractClient* delayfocus_client; | 591 | AbstractClient* delayfocus_client; | ||
592 | QPoint focusMousePos; | 592 | QPoint focusMousePos; | ||
593 | 593 | | |||
594 | ClientList clients; | 594 | QList<X11Client *> clients; | ||
595 | QList<AbstractClient*> m_allClients; | 595 | QList<AbstractClient*> m_allClients; | ||
596 | ClientList desktops; | 596 | QList<X11Client *> desktops; | ||
597 | UnmanagedList unmanaged; | 597 | QList<Unmanaged *> unmanaged; | ||
598 | DeletedList deleted; | 598 | QList<Deleted *> deleted; | ||
599 | QList<InternalClient *> m_internalClients; | 599 | QList<InternalClient *> m_internalClients; | ||
600 | 600 | | |||
601 | ToplevelList unconstrained_stacking_order; // Topmost last | 601 | QList<Toplevel *> unconstrained_stacking_order; // Topmost last | ||
602 | ToplevelList stacking_order; // Topmost last | 602 | QList<Toplevel *> stacking_order; // Topmost last | ||
603 | QVector<xcb_window_t> manual_overlays; //Topmost last | 603 | QVector<xcb_window_t> manual_overlays; //Topmost last | ||
604 | bool force_restacking; | 604 | bool force_restacking; | ||
605 | ToplevelList x_stacking; // From XQueryTree() | 605 | QList<Toplevel *> x_stacking; // From XQueryTree() | ||
606 | std::unique_ptr<Xcb::Tree> m_xStackingQueryTree; | 606 | std::unique_ptr<Xcb::Tree> m_xStackingQueryTree; | ||
607 | bool m_xStackingDirty = false; | 607 | bool m_xStackingDirty = false; | ||
608 | QList<AbstractClient*> should_get_focus; // Last is most recent | 608 | QList<AbstractClient*> should_get_focus; // Last is most recent | ||
609 | QList<AbstractClient*> attention_chain; | 609 | QList<AbstractClient*> attention_chain; | ||
610 | 610 | | |||
611 | bool showing_desktop; | 611 | bool showing_desktop; | ||
612 | 612 | | |||
613 | GroupList groups; | 613 | QList<Group *> groups; | ||
614 | 614 | | |||
615 | bool was_user_interaction; | 615 | bool was_user_interaction; | ||
616 | QScopedPointer<X11EventFilter> m_wasUserInteractionFilter; | 616 | QScopedPointer<X11EventFilter> m_wasUserInteractionFilter; | ||
617 | 617 | | |||
618 | int session_active_client; | 618 | int session_active_client; | ||
619 | int session_desktop; | 619 | int session_desktop; | ||
620 | 620 | | |||
621 | int block_focus; | 621 | int block_focus; | ||
▲ Show 20 Lines • Show All 103 Lines • ▼ Show 20 Line(s) | 723 | { | |||
725 | groups.append(group); | 725 | groups.append(group); | ||
726 | } | 726 | } | ||
727 | 727 | | |||
728 | inline void Workspace::removeGroup(Group* group) | 728 | inline void Workspace::removeGroup(Group* group) | ||
729 | { | 729 | { | ||
730 | groups.removeAll(group); | 730 | groups.removeAll(group); | ||
731 | } | 731 | } | ||
732 | 732 | | |||
733 | inline const ToplevelList& Workspace::stackingOrder() const | 733 | inline const QList<Toplevel *> &Workspace::stackingOrder() const | ||
734 | { | 734 | { | ||
735 | // TODO: Q_ASSERT( block_stacking_updates == 0 ); | 735 | // TODO: Q_ASSERT( block_stacking_updates == 0 ); | ||
736 | return stacking_order; | 736 | return stacking_order; | ||
737 | } | 737 | } | ||
738 | 738 | | |||
739 | inline bool Workspace::wasUserInteraction() const | 739 | inline bool Workspace::wasUserInteraction() const | ||
740 | { | 740 | { | ||
741 | return was_user_interaction; | 741 | return was_user_interaction; | ||
▲ Show 20 Lines • Show All 62 Lines • Show Last 20 Lines |