Changeset View
Changeset View
Standalone View
Standalone View
abstract_client.h
Show First 20 Lines • Show All 447 Lines • ▼ Show 20 Line(s) | 321 | public: | |||
---|---|---|---|---|---|
448 | * false for Normal, Dialog, Utility and Menu (and Toolbar??? - not yet) TODO | 448 | * false for Normal, Dialog, Utility and Menu (and Toolbar??? - not yet) TODO | ||
449 | */ | 449 | */ | ||
450 | bool isSpecialWindow() const; | 450 | bool isSpecialWindow() const; | ||
451 | void sendToScreen(int screen); | 451 | void sendToScreen(int screen); | ||
452 | const QKeySequence &shortcut() const { | 452 | const QKeySequence &shortcut() const { | ||
453 | return _shortcut; | 453 | return _shortcut; | ||
454 | } | 454 | } | ||
455 | void setShortcut(const QString &cut); | 455 | void setShortcut(const QString &cut); | ||
456 | virtual bool performMouseCommand(Options::MouseCommand, const QPoint &globalPos); | 456 | bool performMouseCommand(Options::MouseCommand, const QPoint &globalPos); | ||
457 | void setOnAllDesktops(bool set); | 457 | void setOnAllDesktops(bool set); | ||
458 | void setDesktop(int); | 458 | void setDesktop(int); | ||
459 | void enterDesktop(VirtualDesktop *desktop); | 459 | void enterDesktop(VirtualDesktop *desktop); | ||
460 | void leaveDesktop(VirtualDesktop *desktop); | 460 | void leaveDesktop(VirtualDesktop *desktop); | ||
461 | 461 | | |||
462 | /** | 462 | /** | ||
463 | * Set the window as being on the attached list of desktops | 463 | * Set the window as being on the attached list of desktops | ||
464 | * On X11 it will be set to the last entry | 464 | * On X11 it will be set to the last entry | ||
▲ Show 20 Lines • Show All 47 Lines • ▼ Show 20 Line(s) | |||||
512 | */ | 512 | */ | ||
513 | virtual bool isMovableAcrossScreens() const = 0; | 513 | virtual bool isMovableAcrossScreens() const = 0; | ||
514 | /** | 514 | /** | ||
515 | * @c true only for @c ShadeNormal | 515 | * @c true only for @c ShadeNormal | ||
516 | */ | 516 | */ | ||
517 | bool isShade() const { | 517 | bool isShade() const { | ||
518 | return shadeMode() == ShadeNormal; | 518 | return shadeMode() == ShadeNormal; | ||
519 | } | 519 | } | ||
520 | /** | 520 | ShadeMode shadeMode() const; // Prefer isShade() | ||
521 | * Default implementation returns @c ShadeNone | | |||
522 | */ | | |||
523 | virtual ShadeMode shadeMode() const; // Prefer isShade() | | |||
524 | void setShade(bool set); | 521 | void setShade(bool set); | ||
525 | /** | 522 | void setShade(ShadeMode mode); | ||
526 | * Default implementation does nothing | 523 | void toggleShade(); | ||
527 | */ | 524 | void cancelShadeHoverTimer(); | ||
528 | virtual void setShade(ShadeMode mode); | | |||
529 | /** | 525 | /** | ||
530 | * Whether the Client can be shaded. Default implementation returns @c false. | 526 | * Whether the Client can be shaded. Default implementation returns @c false. | ||
531 | */ | 527 | */ | ||
532 | virtual bool isShadeable() const; | 528 | virtual bool isShadeable() const; | ||
533 | virtual bool isMaximizable() const; | 529 | virtual bool isMaximizable() const; | ||
534 | virtual bool isMinimizable() const; | 530 | virtual bool isMinimizable() const; | ||
535 | virtual QRect iconGeometry() const; | 531 | virtual QRect iconGeometry() const; | ||
536 | virtual bool userCanSetFullScreen() const; | 532 | virtual bool userCanSetFullScreen() const; | ||
▲ Show 20 Lines • Show All 408 Lines • ▼ Show 20 Line(s) | 913 | protected: | |||
945 | /** | 941 | /** | ||
946 | * Called from setKeepBelow once the keepBelow value got updated, but before the changed signal | 942 | * Called from setKeepBelow once the keepBelow value got updated, but before the changed signal | ||
947 | * is emitted. | 943 | * is emitted. | ||
948 | * | 944 | * | ||
949 | * Default implementation does nothing. | 945 | * Default implementation does nothing. | ||
950 | */ | 946 | */ | ||
951 | virtual void doSetKeepBelow(); | 947 | virtual void doSetKeepBelow(); | ||
952 | /** | 948 | /** | ||
949 | * Called from setShade() once the shadeMode value got updated, but before the changed signal | ||||
950 | * is emitted. | ||||
951 | * | ||||
952 | * Default implementation does nothing. | ||||
953 | */ | ||||
954 | virtual void doSetShade(ShadeMode previousShadeMode); | ||||
955 | /** | ||||
953 | * Called from setDeskop once the desktop value got updated, but before the changed signal | 956 | * Called from setDeskop once the desktop value got updated, but before the changed signal | ||
954 | * is emitted. | 957 | * is emitted. | ||
955 | * | 958 | * | ||
956 | * Default implementation does nothing. | 959 | * Default implementation does nothing. | ||
957 | */ | 960 | */ | ||
958 | virtual void doSetDesktop(); | 961 | virtual void doSetDesktop(); | ||
959 | /** | 962 | /** | ||
960 | * Called from @ref minimize and @ref unminimize once the minimized value got updated, but before the | 963 | * Called from @ref minimize and @ref unminimize once the minimized value got updated, but before the | ||
▲ Show 20 Lines • Show All 237 Lines • ▼ Show 20 Line(s) | |||||
1198 | */ | 1201 | */ | ||
1199 | AbstractClient *findClientWithSameCaption() const; | 1202 | AbstractClient *findClientWithSameCaption() const; | ||
1200 | 1203 | | |||
1201 | void finishWindowRules(); | 1204 | void finishWindowRules(); | ||
1202 | void discardTemporaryRules(); | 1205 | void discardTemporaryRules(); | ||
1203 | 1206 | | |||
1204 | bool tabTo(AbstractClient *other, bool behind, bool activate); | 1207 | bool tabTo(AbstractClient *other, bool behind, bool activate); | ||
1205 | 1208 | | |||
1209 | void startShadeHoverTimer(); | ||||
1210 | void startShadeUnhoverTimer(); | ||||
1211 | | ||||
1212 | private Q_SLOTS: | ||||
1213 | void shadeHover(); | ||||
1214 | void shadeUnhover(); | ||||
1215 | | ||||
1206 | private: | 1216 | private: | ||
1207 | void handlePaletteChange(); | 1217 | void handlePaletteChange(); | ||
1208 | QSharedPointer<TabBox::TabBoxClientImpl> m_tabBoxClient; | 1218 | QSharedPointer<TabBox::TabBoxClientImpl> m_tabBoxClient; | ||
1209 | bool m_firstInTabBox = false; | 1219 | bool m_firstInTabBox = false; | ||
1210 | bool m_skipTaskbar = false; | 1220 | bool m_skipTaskbar = false; | ||
1211 | /** | 1221 | /** | ||
1212 | * Unaffected by KWin | 1222 | * Unaffected by KWin | ||
1213 | */ | 1223 | */ | ||
1214 | bool m_originalSkipTaskbar = false; | 1224 | bool m_originalSkipTaskbar = false; | ||
1215 | bool m_skipPager = false; | 1225 | bool m_skipPager = false; | ||
1216 | bool m_skipSwitcher = false; | 1226 | bool m_skipSwitcher = false; | ||
1217 | QIcon m_icon; | 1227 | QIcon m_icon; | ||
1218 | bool m_active = false; | 1228 | bool m_active = false; | ||
1219 | bool m_keepAbove = false; | 1229 | bool m_keepAbove = false; | ||
1220 | bool m_keepBelow = false; | 1230 | bool m_keepBelow = false; | ||
1221 | bool m_demandsAttention = false; | 1231 | bool m_demandsAttention = false; | ||
1222 | bool m_minimized = false; | 1232 | bool m_minimized = false; | ||
1223 | QTimer *m_autoRaiseTimer = nullptr; | 1233 | QTimer *m_autoRaiseTimer = nullptr; | ||
1234 | QTimer *m_shadeHoverTimer = nullptr; | ||||
1235 | ShadeMode m_shadeMode = ShadeNone; | ||||
1224 | QVector <VirtualDesktop *> m_desktops; | 1236 | QVector <VirtualDesktop *> m_desktops; | ||
1225 | 1237 | | |||
1226 | QString m_colorScheme; | 1238 | QString m_colorScheme; | ||
1227 | std::shared_ptr<Decoration::DecorationPalette> m_palette; | 1239 | std::shared_ptr<Decoration::DecorationPalette> m_palette; | ||
1228 | static QHash<QString, std::weak_ptr<Decoration::DecorationPalette>> s_palettes; | 1240 | static QHash<QString, std::weak_ptr<Decoration::DecorationPalette>> s_palettes; | ||
1229 | static std::shared_ptr<Decoration::DecorationPalette> s_defaultPalette; | 1241 | static std::shared_ptr<Decoration::DecorationPalette> s_defaultPalette; | ||
1230 | 1242 | | |||
1231 | KWaylandServer::PlasmaWindowInterface *m_windowManagementInterface = nullptr; | 1243 | KWaylandServer::PlasmaWindowInterface *m_windowManagementInterface = nullptr; | ||
▲ Show 20 Lines • Show All 118 Lines • Show Last 20 Lines |