Changeset View
Changeset View
Standalone View
Standalone View
options.h
Show All 20 Lines | |||||
21 | *********************************************************************/ | 21 | *********************************************************************/ | ||
22 | 22 | | |||
23 | #ifndef KWIN_OPTIONS_H | 23 | #ifndef KWIN_OPTIONS_H | ||
24 | #define KWIN_OPTIONS_H | 24 | #define KWIN_OPTIONS_H | ||
25 | 25 | | |||
26 | #include "main.h" | 26 | #include "main.h" | ||
27 | #include "placement.h" | 27 | #include "placement.h" | ||
28 | 28 | | |||
29 | #include <KConfigWatcher> | ||||
30 | | ||||
29 | namespace KWin | 31 | namespace KWin | ||
30 | { | 32 | { | ||
31 | 33 | | |||
32 | // Whether to keep all windows mapped when compositing (i.e. whether to have | 34 | // Whether to keep all windows mapped when compositing (i.e. whether to have | ||
33 | // actively updated window pixmaps). | 35 | // actively updated window pixmaps). | ||
34 | enum HiddenPreviews { | 36 | enum HiddenPreviews { | ||
35 | // The normal mode with regard to mapped windows. Hidden (minimized, etc.) | 37 | // The normal mode with regard to mapped windows. Hidden (minimized, etc.) | ||
36 | // and windows on inactive virtual desktops are not mapped, their pixmaps | 38 | // and windows on inactive virtual desktops are not mapped, their pixmaps | ||
▲ Show 20 Lines • Show All 723 Lines • ▼ Show 20 Line(s) | 761 | static bool defaultGLCoreProfile() { | |||
760 | return false; | 762 | return false; | ||
761 | } | 763 | } | ||
762 | static GlSwapStrategy defaultGlPreferBufferSwap() { | 764 | static GlSwapStrategy defaultGlPreferBufferSwap() { | ||
763 | return AutoSwapStrategy; | 765 | return AutoSwapStrategy; | ||
764 | } | 766 | } | ||
765 | static OpenGLPlatformInterface defaultGlPlatformInterface() { | 767 | static OpenGLPlatformInterface defaultGlPlatformInterface() { | ||
766 | return kwinApp()->shouldUseWaylandForCompositing() ? EglPlatformInterface : GlxPlatformInterface; | 768 | return kwinApp()->shouldUseWaylandForCompositing() ? EglPlatformInterface : GlxPlatformInterface; | ||
767 | }; | 769 | }; | ||
768 | static int defaultAnimationSpeed() { | | |||
769 | return 3; | | |||
770 | } | | |||
771 | 770 | | |||
772 | /** | 771 | /** | ||
773 | * Performs loading all settings except compositing related. | 772 | * Performs loading all settings except compositing related. | ||
774 | */ | 773 | */ | ||
775 | void loadConfig(); | 774 | void loadConfig(); | ||
776 | /** | 775 | /** | ||
777 | * Performs loading of compositing settings which do not depend on OpenGL. | 776 | * Performs loading of compositing settings which do not depend on OpenGL. | ||
778 | */ | 777 | */ | ||
▲ Show 20 Lines • Show All 60 Lines • ▼ Show 20 Line(s) | 784 | Q_SIGNALS: | |||
839 | void refreshRateChanged(); | 838 | void refreshRateChanged(); | ||
840 | void vBlankTimeChanged(); | 839 | void vBlankTimeChanged(); | ||
841 | void glStrictBindingChanged(); | 840 | void glStrictBindingChanged(); | ||
842 | void glStrictBindingFollowsDriverChanged(); | 841 | void glStrictBindingFollowsDriverChanged(); | ||
843 | void glCoreProfileChanged(); | 842 | void glCoreProfileChanged(); | ||
844 | void glPreferBufferSwapChanged(); | 843 | void glPreferBufferSwapChanged(); | ||
845 | void glPlatformInterfaceChanged(); | 844 | void glPlatformInterfaceChanged(); | ||
846 | void windowsBlockCompositingChanged(); | 845 | void windowsBlockCompositingChanged(); | ||
846 | void animationSpeedChanged(); | ||||
847 | 847 | | |||
848 | void configChanged(); | 848 | void configChanged(); | ||
849 | 849 | | |||
850 | private: | 850 | private: | ||
851 | void setElectricBorders(int borders); | 851 | void setElectricBorders(int borders); | ||
852 | void syncFromKcfgc(); | 852 | void syncFromKcfgc(); | ||
853 | QScopedPointer<Settings> m_settings; | 853 | QScopedPointer<Settings> m_settings; | ||
854 | KConfigWatcher::Ptr m_configWatcher; | ||||
855 | | ||||
854 | FocusPolicy m_focusPolicy; | 856 | FocusPolicy m_focusPolicy; | ||
855 | bool m_nextFocusPrefersMouse; | 857 | bool m_nextFocusPrefersMouse; | ||
856 | bool m_clickRaise; | 858 | bool m_clickRaise; | ||
857 | bool m_autoRaise; | 859 | bool m_autoRaise; | ||
858 | int m_autoRaiseInterval; | 860 | int m_autoRaiseInterval; | ||
859 | int m_delayFocusInterval; | 861 | int m_delayFocusInterval; | ||
860 | bool m_shadeHover; | 862 | bool m_shadeHover; | ||
861 | int m_shadeHoverInterval; | 863 | int m_shadeHoverInterval; | ||
▲ Show 20 Lines • Show All 51 Lines • ▼ Show 20 Line(s) | |||||
913 | uint CmdAllModKey; | 915 | uint CmdAllModKey; | ||
914 | 916 | | |||
915 | bool electric_border_maximize; | 917 | bool electric_border_maximize; | ||
916 | bool electric_border_tiling; | 918 | bool electric_border_tiling; | ||
917 | float electric_border_corner_ratio; | 919 | float electric_border_corner_ratio; | ||
918 | bool borderless_maximized_windows; | 920 | bool borderless_maximized_windows; | ||
919 | bool show_geometry_tip; | 921 | bool show_geometry_tip; | ||
920 | bool condensed_title; | 922 | bool condensed_title; | ||
921 | int animationSpeed; // 0 - instant, 5 - very slow | | |||
922 | 923 | | |||
923 | QHash<Qt::KeyboardModifier, QStringList> m_modifierOnlyShortcuts; | 924 | QHash<Qt::KeyboardModifier, QStringList> m_modifierOnlyShortcuts; | ||
924 | 925 | | |||
925 | MouseCommand wheelToMouseCommand(MouseWheelCommand com, int delta) const; | 926 | MouseCommand wheelToMouseCommand(MouseWheelCommand com, int delta) const; | ||
926 | }; | 927 | }; | ||
927 | 928 | | |||
928 | extern KWIN_EXPORT Options* options; | 929 | extern KWIN_EXPORT Options* options; | ||
929 | 930 | | |||
930 | } // namespace | 931 | } // namespace | ||
931 | 932 | | |||
932 | Q_DECLARE_METATYPE(KWin::Options::WindowOperation) | 933 | Q_DECLARE_METATYPE(KWin::Options::WindowOperation) | ||
933 | Q_DECLARE_METATYPE(KWin::OpenGLPlatformInterface) | 934 | Q_DECLARE_METATYPE(KWin::OpenGLPlatformInterface) | ||
934 | 935 | | |||
935 | #endif | 936 | #endif |