Changeset View
Standalone View
workspace.h
Show First 20 Lines • Show All 238 Lines • ▼ Show 20 Line(s) | 67 | public: | |||
---|---|---|---|---|---|
239 | * @returns List of all internal clients currently managed by Workspace | 239 | * @returns List of all internal clients currently managed by Workspace | ||
240 | */ | 240 | */ | ||
241 | const QList<InternalClient *> &internalClients() const { | 241 | const QList<InternalClient *> &internalClients() const { | ||
242 | return m_internalClients; | 242 | return m_internalClients; | ||
243 | } | 243 | } | ||
244 | 244 | | |||
245 | void stackScreenEdgesUnderOverrideRedirect(); | 245 | void stackScreenEdgesUnderOverrideRedirect(); | ||
246 | 246 | | |||
247 | SessionManager *sessionManager() const; | ||||
zzag: Style: Put whitespace before `*`.
| |||||
248 | | ||||
247 | public: | 249 | public: | ||
248 | QPoint cascadeOffset(const AbstractClient *c) const; | 250 | QPoint cascadeOffset(const AbstractClient *c) const; | ||
249 | 251 | | |||
250 | private: | 252 | private: | ||
251 | Compositor *m_compositor; | 253 | Compositor *m_compositor; | ||
252 | 254 | | |||
253 | //------------------------------------------------- | 255 | //------------------------------------------------- | ||
254 | // Unsorted | 256 | // Unsorted | ||
▲ Show 20 Lines • Show All 79 Lines • ▼ Show 20 Line(s) | 258 | public: | |||
334 | 336 | | |||
335 | void focusToNull(); // SELI TODO: Public? | 337 | void focusToNull(); // SELI TODO: Public? | ||
336 | 338 | | |||
337 | void clientShortcutUpdated(AbstractClient* c); | 339 | void clientShortcutUpdated(AbstractClient* c); | ||
338 | bool shortcutAvailable(const QKeySequence &cut, AbstractClient* ignore = nullptr) const; | 340 | bool shortcutAvailable(const QKeySequence &cut, AbstractClient* ignore = nullptr) const; | ||
339 | bool globalShortcutsDisabled() const; | 341 | bool globalShortcutsDisabled() const; | ||
340 | void disableGlobalShortcutsForClient(bool disable); | 342 | void disableGlobalShortcutsForClient(bool disable); | ||
341 | 343 | | |||
342 | void sessionSaveStarted(); | | |||
343 | void sessionSaveDone(); | | |||
344 | void setWasUserInteraction(); | 344 | void setWasUserInteraction(); | ||
345 | bool wasUserInteraction() const; | 345 | bool wasUserInteraction() const; | ||
346 | bool sessionSaving() const; | | |||
347 | 346 | | |||
348 | int packPositionLeft(const AbstractClient *client, int oldX, bool leftEdge) const; | 347 | int packPositionLeft(const AbstractClient *client, int oldX, bool leftEdge) const; | ||
349 | int packPositionRight(const AbstractClient *client, int oldX, bool rightEdge) const; | 348 | int packPositionRight(const AbstractClient *client, int oldX, bool rightEdge) const; | ||
350 | int packPositionUp(const AbstractClient *client, int oldY, bool topEdge) const; | 349 | int packPositionUp(const AbstractClient *client, int oldY, bool topEdge) const; | ||
351 | int packPositionDown(const AbstractClient *client, int oldY, bool bottomEdge) const; | 350 | int packPositionDown(const AbstractClient *client, int oldY, bool bottomEdge) const; | ||
352 | 351 | | |||
353 | void cancelDelayFocus(); | 352 | void cancelDelayFocus(); | ||
354 | void requestDelayFocus(AbstractClient*); | 353 | void requestDelayFocus(AbstractClient*); | ||
▲ Show 20 Lines • Show All 119 Lines • ▼ Show 20 Line(s) | 418 | public Q_SLOTS: | |||
474 | 473 | | |||
475 | void slotKillWindow(); | 474 | void slotKillWindow(); | ||
476 | 475 | | |||
477 | void slotSetupWindowShortcut(); | 476 | void slotSetupWindowShortcut(); | ||
478 | void setupWindowShortcutDone(bool); | 477 | void setupWindowShortcutDone(bool); | ||
479 | 478 | | |||
480 | void updateClientArea(); | 479 | void updateClientArea(); | ||
481 | 480 | | |||
482 | private Q_SLOTS: | 481 | private Q_SLOTS: | ||
483 | void desktopResized(); | 482 | void desktopResized(); | ||
484 | void selectWmInputEventMask(); | 483 | void selectWmInputEventMask(); | ||
485 | void slotUpdateToolWindows(); | 484 | void slotUpdateToolWindows(); | ||
486 | void delayFocus(); | 485 | void delayFocus(); | ||
487 | void slotReloadConfig(); | 486 | void slotReloadConfig(); | ||
Hmm, that's kinda domain of SessionManager. Also, the last one doesn't qualify as a slot. What do you think about moving these two to SessionManager? zzag: Hmm, that's kinda domain of SessionManager. Also, the last one doesn't qualify as a slot.
What… | |||||
Yeah, I was torn originally, so no objections. My reasoning against was that I didn't want to have the state in one place and Workspace::sessionSaving() in another, but I could port all the relevant code calling that. davidedmundson: Yeah, I was torn originally, so no objections.
My reasoning against was that I didn't want to… | |||||
zzag: Yes please | |||||
488 | void updateCurrentActivity(const QString &new_activity); | 487 | void updateCurrentActivity(const QString &new_activity); | ||
489 | // virtual desktop handling | 488 | // virtual desktop handling | ||
490 | void slotDesktopCountChanged(uint previousCount, uint newCount); | 489 | void slotDesktopCountChanged(uint previousCount, uint newCount); | ||
491 | void slotCurrentDesktopChanged(uint oldDesktop, uint newDesktop); | 490 | void slotCurrentDesktopChanged(uint oldDesktop, uint newDesktop); | ||
492 | 491 | | |||
493 | // session management | 492 | // session management | ||
494 | void saveState(QSessionManager &sm); | 493 | void saveState(QSessionManager &sm); | ||
495 | void commitData(QSessionManager &sm); | | |||
496 | 494 | | |||
497 | Q_SIGNALS: | 495 | Q_SIGNALS: | ||
498 | /** | 496 | /** | ||
499 | * Emitted after the Workspace has setup the complete initialization process. | 497 | * Emitted after the Workspace has setup the complete initialization process. | ||
500 | * This can be used to connect to for performing post-workspace initialization. | 498 | * This can be used to connect to for performing post-workspace initialization. | ||
501 | */ | 499 | */ | ||
502 | void workspaceInitialized(); | 500 | void workspaceInitialized(); | ||
503 | 501 | | |||
▲ Show 20 Lines • Show All 107 Lines • ▼ Show 20 Line(s) | 532 | private: | |||
611 | QList<AbstractClient*> attention_chain; | 609 | QList<AbstractClient*> attention_chain; | ||
612 | 610 | | |||
613 | bool showing_desktop; | 611 | bool showing_desktop; | ||
614 | 612 | | |||
615 | GroupList groups; | 613 | GroupList groups; | ||
616 | 614 | | |||
617 | bool was_user_interaction; | 615 | bool was_user_interaction; | ||
618 | QScopedPointer<X11EventFilter> m_wasUserInteractionFilter; | 616 | QScopedPointer<X11EventFilter> m_wasUserInteractionFilter; | ||
619 | bool session_saving; | 617 | | ||
620 | int session_active_client; | 618 | int session_active_client; | ||
621 | int session_desktop; | 619 | int session_desktop; | ||
622 | 620 | | |||
623 | int block_focus; | 621 | int block_focus; | ||
624 | 622 | | |||
625 | /** | 623 | /** | ||
626 | * Holds the menu containing the user actions which is shown | 624 | * Holds the menu containing the user actions which is shown | ||
627 | * on e.g. right click the window decoration. | 625 | * on e.g. right click the window decoration. | ||
Show All 33 Lines | |||||
661 | friend class StackingUpdatesBlocker; | 659 | friend class StackingUpdatesBlocker; | ||
662 | 660 | | |||
663 | QScopedPointer<KillWindow> m_windowKiller; | 661 | QScopedPointer<KillWindow> m_windowKiller; | ||
664 | 662 | | |||
665 | QList<X11EventFilter *> m_eventFilters; | 663 | QList<X11EventFilter *> m_eventFilters; | ||
666 | QList<X11EventFilter *> m_genericEventFilters; | 664 | QList<X11EventFilter *> m_genericEventFilters; | ||
667 | QScopedPointer<X11EventFilter> m_movingClientFilter; | 665 | QScopedPointer<X11EventFilter> m_movingClientFilter; | ||
668 | 666 | | |||
667 | SessionManager *m_sessionManager; | ||||
669 | private: | 668 | private: | ||
670 | friend bool performTransiencyCheck(); | 669 | friend bool performTransiencyCheck(); | ||
671 | friend Workspace *workspace(); | 670 | friend Workspace *workspace(); | ||
672 | }; | 671 | }; | ||
673 | 672 | | |||
674 | /** | 673 | /** | ||
675 | * Helper for Workspace::blockStackingUpdates() being called in pairs (True/false) | 674 | * Helper for Workspace::blockStackingUpdates() being called in pairs (True/false) | ||
676 | */ | 675 | */ | ||
▲ Show 20 Lines • Show All 60 Lines • ▼ Show 20 Line(s) | 734 | { | |||
737 | return stacking_order; | 736 | return stacking_order; | ||
738 | } | 737 | } | ||
739 | 738 | | |||
740 | inline bool Workspace::wasUserInteraction() const | 739 | inline bool Workspace::wasUserInteraction() const | ||
741 | { | 740 | { | ||
742 | return was_user_interaction; | 741 | return was_user_interaction; | ||
743 | } | 742 | } | ||
744 | 743 | | |||
745 | inline void Workspace::sessionSaveStarted() | 744 | inline SessionManager *Workspace::sessionManager() const | ||
Style: We still follow the Frameworks coding style, which says that we have to put whitespace before *. One could argue that return types have special meaning, but a coding review is not a place to enforce personal preferences that are uncommon or haven't been agreed upon by other developers. Such matter must be raised to the discussion in other places, e.g. a task or a mailing list. Also, no such a tool exists that would format code with this style. zzag: Style: We still follow the Frameworks coding style, which says that we have to put whitespace… | |||||
zzag: This inline comment is not addressed. | |||||
746 | { | | |||
747 | session_saving = true; | | |||
748 | } | | |||
749 | | ||||
750 | inline bool Workspace::sessionSaving() const | | |||
751 | { | 745 | { | ||
752 | return session_saving; | 746 | return m_sessionManager; | ||
753 | } | 747 | } | ||
754 | 748 | | |||
755 | inline bool Workspace::showingDesktop() const | 749 | inline bool Workspace::showingDesktop() const | ||
756 | { | 750 | { | ||
757 | return showing_desktop; | 751 | return showing_desktop; | ||
758 | } | 752 | } | ||
759 | 753 | | |||
760 | inline bool Workspace::globalShortcutsDisabled() const | 754 | inline bool Workspace::globalShortcutsDisabled() const | ||
▲ Show 20 Lines • Show All 49 Lines • Show Last 20 Lines |
Style: Put whitespace before *.