Changeset View
Changeset View
Standalone View
Standalone View
workspace.h
Show All 26 Lines | |||||
27 | #include "sm.h" | 27 | #include "sm.h" | ||
28 | #include "options.h" | 28 | #include "options.h" | ||
29 | #include "utils.h" | 29 | #include "utils.h" | ||
30 | // Qt | 30 | // Qt | ||
31 | #include <QTimer> | 31 | #include <QTimer> | ||
32 | #include <QVector> | 32 | #include <QVector> | ||
33 | // std | 33 | // std | ||
34 | #include <functional> | 34 | #include <functional> | ||
35 | #include <memory> | ||||
35 | 36 | | |||
36 | // TODO: Cleanup the order of things in this .h file | 37 | // TODO: Cleanup the order of things in this .h file | ||
37 | 38 | | |||
38 | class QStringList; | 39 | class QStringList; | ||
39 | class KConfig; | 40 | class KConfig; | ||
40 | class KConfigGroup; | 41 | class KConfigGroup; | ||
41 | class KStartupInfo; | 42 | class KStartupInfo; | ||
42 | class KStartupInfoId; | 43 | class KStartupInfoId; | ||
43 | class KStartupInfoData; | 44 | class KStartupInfoData; | ||
44 | 45 | | |||
45 | namespace KWin | 46 | namespace KWin | ||
46 | { | 47 | { | ||
47 | 48 | | |||
48 | namespace Xcb | 49 | namespace Xcb | ||
49 | { | 50 | { | ||
51 | class Tree; | ||||
50 | class Window; | 52 | class Window; | ||
51 | } | 53 | } | ||
52 | 54 | | |||
53 | class AbstractClient; | 55 | class AbstractClient; | ||
54 | class Client; | 56 | class Client; | ||
55 | class KillWindow; | 57 | class KillWindow; | ||
56 | class ShortcutDialog; | 58 | class ShortcutDialog; | ||
57 | class UserActionsMenu; | 59 | class UserActionsMenu; | ||
▲ Show 20 Lines • Show All 302 Lines • ▼ Show 20 Line(s) | 254 | public: | |||
360 | /** | 362 | /** | ||
361 | * @returns Whether we have a Compositor and it is active (Scene created) | 363 | * @returns Whether we have a Compositor and it is active (Scene created) | ||
362 | **/ | 364 | **/ | ||
363 | bool compositing() const; | 365 | bool compositing() const; | ||
364 | 366 | | |||
365 | void registerEventFilter(X11EventFilter *filter); | 367 | void registerEventFilter(X11EventFilter *filter); | ||
366 | void unregisterEventFilter(X11EventFilter *filter); | 368 | void unregisterEventFilter(X11EventFilter *filter); | ||
367 | 369 | | |||
370 | void markXStackingOrderAsDirty(); | ||||
371 | | ||||
368 | public Q_SLOTS: | 372 | public Q_SLOTS: | ||
369 | void performWindowOperation(KWin::AbstractClient* c, Options::WindowOperation op); | 373 | void performWindowOperation(KWin::AbstractClient* c, Options::WindowOperation op); | ||
370 | // Keybindings | 374 | // Keybindings | ||
371 | //void slotSwitchToWindow( int ); | 375 | //void slotSwitchToWindow( int ); | ||
372 | void slotWindowToDesktop(); | 376 | void slotWindowToDesktop(); | ||
373 | 377 | | |||
374 | //void slotWindowToListPosition( int ); | 378 | //void slotWindowToListPosition( int ); | ||
375 | void slotSwitchToScreen(); | 379 | void slotSwitchToScreen(); | ||
▲ Show 20 Lines • Show All 165 Lines • ▼ Show 20 Line(s) | 498 | private: | |||
541 | void loadSessionInfo(const QString &key); | 545 | void loadSessionInfo(const QString &key); | ||
542 | void addSessionInfo(KConfigGroup &cg); | 546 | void addSessionInfo(KConfigGroup &cg); | ||
543 | 547 | | |||
544 | QList<SessionInfo*> session; | 548 | QList<SessionInfo*> session; | ||
545 | static const char* windowTypeToTxt(NET::WindowType type); | 549 | static const char* windowTypeToTxt(NET::WindowType type); | ||
546 | static NET::WindowType txtToWindowType(const char* txt); | 550 | static NET::WindowType txtToWindowType(const char* txt); | ||
547 | static bool sessionInfoWindowTypeMatch(Client* c, SessionInfo* info); | 551 | static bool sessionInfoWindowTypeMatch(Client* c, SessionInfo* info); | ||
548 | 552 | | |||
549 | void markXStackingOrderAsDirty(); | 553 | void updateXStackingOrder(); | ||
550 | 554 | | |||
551 | AbstractClient* active_client; | 555 | AbstractClient* active_client; | ||
552 | AbstractClient* last_active_client; | 556 | AbstractClient* last_active_client; | ||
553 | AbstractClient* most_recently_raised; // Used ONLY by raiseOrLowerClient() | 557 | AbstractClient* most_recently_raised; // Used ONLY by raiseOrLowerClient() | ||
554 | AbstractClient* movingClient; | 558 | AbstractClient* movingClient; | ||
555 | 559 | | |||
556 | // Delay(ed) window focus timer and client | 560 | // Delay(ed) window focus timer and client | ||
557 | QTimer* delayFocusTimer; | 561 | QTimer* delayFocusTimer; | ||
558 | AbstractClient* delayfocus_client; | 562 | AbstractClient* delayfocus_client; | ||
559 | QPoint focusMousePos; | 563 | QPoint focusMousePos; | ||
560 | 564 | | |||
561 | ClientList clients; | 565 | ClientList clients; | ||
562 | QList<AbstractClient*> m_allClients; | 566 | QList<AbstractClient*> m_allClients; | ||
563 | ClientList desktops; | 567 | ClientList desktops; | ||
564 | UnmanagedList unmanaged; | 568 | UnmanagedList unmanaged; | ||
565 | DeletedList deleted; | 569 | DeletedList deleted; | ||
566 | 570 | | |||
567 | ToplevelList unconstrained_stacking_order; // Topmost last | 571 | ToplevelList unconstrained_stacking_order; // Topmost last | ||
568 | ToplevelList stacking_order; // Topmost last | 572 | ToplevelList stacking_order; // Topmost last | ||
569 | bool force_restacking; | 573 | bool force_restacking; | ||
570 | mutable ToplevelList x_stacking; // From XQueryTree() | 574 | ToplevelList x_stacking; // From XQueryTree() | ||
571 | mutable bool x_stacking_dirty; | 575 | std::unique_ptr<Xcb::Tree> m_xStackingQueryTree; | ||
572 | QList<AbstractClient*> should_get_focus; // Last is most recent | 576 | QList<AbstractClient*> should_get_focus; // Last is most recent | ||
573 | QList<AbstractClient*> attention_chain; | 577 | QList<AbstractClient*> attention_chain; | ||
574 | 578 | | |||
575 | bool showing_desktop; | 579 | bool showing_desktop; | ||
576 | 580 | | |||
577 | GroupList groups; | 581 | GroupList groups; | ||
578 | 582 | | |||
579 | bool was_user_interaction; | 583 | bool was_user_interaction; | ||
▲ Show 20 Lines • Show All 195 Lines • Show Last 20 Lines |