Changeset View
Changeset View
Standalone View
Standalone View
options.cpp
Show First 20 Lines • Show All 119 Lines • ▼ Show 20 Line(s) | 88 | Options::Options(QObject *parent) | |||
---|---|---|---|---|---|
120 | , m_maxFpsInterval(Options::defaultMaxFpsInterval()) | 120 | , m_maxFpsInterval(Options::defaultMaxFpsInterval()) | ||
121 | , m_refreshRate(Options::defaultRefreshRate()) | 121 | , m_refreshRate(Options::defaultRefreshRate()) | ||
122 | , m_vBlankTime(Options::defaultVBlankTime()) | 122 | , m_vBlankTime(Options::defaultVBlankTime()) | ||
123 | , m_glStrictBinding(Options::defaultGlStrictBinding()) | 123 | , m_glStrictBinding(Options::defaultGlStrictBinding()) | ||
124 | , m_glStrictBindingFollowsDriver(Options::defaultGlStrictBindingFollowsDriver()) | 124 | , m_glStrictBindingFollowsDriver(Options::defaultGlStrictBindingFollowsDriver()) | ||
125 | , m_glCoreProfile(Options::defaultGLCoreProfile()) | 125 | , m_glCoreProfile(Options::defaultGLCoreProfile()) | ||
126 | , m_glPreferBufferSwap(Options::defaultGlPreferBufferSwap()) | 126 | , m_glPreferBufferSwap(Options::defaultGlPreferBufferSwap()) | ||
127 | , m_glPlatformInterface(Options::defaultGlPlatformInterface()) | 127 | , m_glPlatformInterface(Options::defaultGlPlatformInterface()) | ||
128 | , m_windowsBlockingCompositing(true) | ||||
128 | , OpTitlebarDblClick(Options::defaultOperationTitlebarDblClick()) | 129 | , OpTitlebarDblClick(Options::defaultOperationTitlebarDblClick()) | ||
129 | , CmdActiveTitlebar1(Options::defaultCommandActiveTitlebar1()) | 130 | , CmdActiveTitlebar1(Options::defaultCommandActiveTitlebar1()) | ||
130 | , CmdActiveTitlebar2(Options::defaultCommandActiveTitlebar2()) | 131 | , CmdActiveTitlebar2(Options::defaultCommandActiveTitlebar2()) | ||
131 | , CmdActiveTitlebar3(Options::defaultCommandActiveTitlebar3()) | 132 | , CmdActiveTitlebar3(Options::defaultCommandActiveTitlebar3()) | ||
132 | , CmdInactiveTitlebar1(Options::defaultCommandInactiveTitlebar1()) | 133 | , CmdInactiveTitlebar1(Options::defaultCommandInactiveTitlebar1()) | ||
133 | , CmdInactiveTitlebar2(Options::defaultCommandInactiveTitlebar2()) | 134 | , CmdInactiveTitlebar2(Options::defaultCommandInactiveTitlebar2()) | ||
134 | , CmdInactiveTitlebar3(Options::defaultCommandInactiveTitlebar3()) | 135 | , CmdInactiveTitlebar3(Options::defaultCommandInactiveTitlebar3()) | ||
135 | , CmdTitlebarWheel(Options::defaultCommandTitlebarWheel()) | 136 | , CmdTitlebarWheel(Options::defaultCommandTitlebarWheel()) | ||
▲ Show 20 Lines • Show All 573 Lines • ▼ Show 20 Line(s) | |||||
709 | { | 710 | { | ||
710 | if (m_glCoreProfile == value) { | 711 | if (m_glCoreProfile == value) { | ||
711 | return; | 712 | return; | ||
712 | } | 713 | } | ||
713 | m_glCoreProfile = value; | 714 | m_glCoreProfile = value; | ||
714 | emit glCoreProfileChanged(); | 715 | emit glCoreProfileChanged(); | ||
715 | } | 716 | } | ||
716 | 717 | | |||
718 | void Options::setWindowsBlockingCompositing(bool value) | ||||
719 | { | ||||
720 | if (m_windowsBlockingCompositing == value) { | ||||
721 | return; | ||||
722 | } | ||||
723 | m_windowsBlockingCompositing = value; | ||||
724 | emit windowsBlockingCompositingChanged(); | ||||
725 | } | ||||
726 | | ||||
717 | void Options::setGlPreferBufferSwap(char glPreferBufferSwap) | 727 | void Options::setGlPreferBufferSwap(char glPreferBufferSwap) | ||
718 | { | 728 | { | ||
719 | if (glPreferBufferSwap == 'a') { | 729 | if (glPreferBufferSwap == 'a') { | ||
720 | // buffer cpying is very fast with the nvidia blob | 730 | // buffer cpying is very fast with the nvidia blob | ||
721 | // but due to restrictions in DRI2 *incredibly* slow for all MESA drivers | 731 | // but due to restrictions in DRI2 *incredibly* slow for all MESA drivers | ||
722 | // see http://www.x.org/releases/X11R7.7/doc/dri2proto/dri2proto.txt, item 2.5 | 732 | // see http://www.x.org/releases/X11R7.7/doc/dri2proto/dri2proto.txt, item 2.5 | ||
723 | if (GLPlatform::instance()->driver() == Driver_NVidia) | 733 | if (GLPlatform::instance()->driver() == Driver_NVidia) | ||
724 | glPreferBufferSwap = CopyFrontBuffer; | 734 | glPreferBufferSwap = CopyFrontBuffer; | ||
▲ Show 20 Lines • Show All 156 Lines • ▼ Show 20 Line(s) | 878 | #endif | |||
881 | setHideUtilityWindowsForInactive(m_settings->hideUtilityWindowsForInactive()); | 891 | setHideUtilityWindowsForInactive(m_settings->hideUtilityWindowsForInactive()); | ||
882 | setInactiveTabsSkipTaskbar(m_settings->inactiveTabsSkipTaskbar()); | 892 | setInactiveTabsSkipTaskbar(m_settings->inactiveTabsSkipTaskbar()); | ||
883 | setAutogroupSimilarWindows(m_settings->autogroupSimilarWindows()); | 893 | setAutogroupSimilarWindows(m_settings->autogroupSimilarWindows()); | ||
884 | setAutogroupInForeground(m_settings->autogroupInForeground()); | 894 | setAutogroupInForeground(m_settings->autogroupInForeground()); | ||
885 | setBorderlessMaximizedWindows(m_settings->borderlessMaximizedWindows()); | 895 | setBorderlessMaximizedWindows(m_settings->borderlessMaximizedWindows()); | ||
886 | setElectricBorderMaximize(m_settings->electricBorderMaximize()); | 896 | setElectricBorderMaximize(m_settings->electricBorderMaximize()); | ||
887 | setElectricBorderTiling(m_settings->electricBorderTiling()); | 897 | setElectricBorderTiling(m_settings->electricBorderTiling()); | ||
888 | setElectricBorderCornerRatio(m_settings->electricBorderCornerRatio()); | 898 | setElectricBorderCornerRatio(m_settings->electricBorderCornerRatio()); | ||
899 | setWindowsBlockingCompositing(m_settings->windowsBlockingCompositing()); | ||||
889 | 900 | | |||
890 | } | 901 | } | ||
891 | 902 | | |||
892 | bool Options::loadCompositingConfig (bool force) | 903 | bool Options::loadCompositingConfig (bool force) | ||
893 | { | 904 | { | ||
894 | KConfigGroup config(m_settings->config(), "Compositing"); | 905 | KConfigGroup config(m_settings->config(), "Compositing"); | ||
895 | 906 | | |||
896 | bool useCompositing = false; | 907 | bool useCompositing = false; | ||
▲ Show 20 Lines • Show All 54 Lines • ▼ Show 20 Line(s) | |||||
951 | return true; | 962 | return true; | ||
952 | } | 963 | } | ||
953 | 964 | | |||
954 | void Options::reloadCompositingSettings(bool force) | 965 | void Options::reloadCompositingSettings(bool force) | ||
955 | { | 966 | { | ||
956 | if (!loadCompositingConfig(force)) { | 967 | if (!loadCompositingConfig(force)) { | ||
957 | return; | 968 | return; | ||
958 | } | 969 | } | ||
970 | m_settings->load(); | ||||
971 | syncFromKcfgc(); | ||||
959 | // from now on we've an initial setup and don't have to reload settings on compositing activation | 972 | // from now on we've an initial setup and don't have to reload settings on compositing activation | ||
960 | // see Workspace::setupCompositing(), composite.cpp | 973 | // see Workspace::setupCompositing(), composite.cpp | ||
961 | setCompositingInitialized(true); | 974 | setCompositingInitialized(true); | ||
962 | 975 | | |||
963 | // Compositing settings | 976 | // Compositing settings | ||
964 | KConfigGroup config(m_settings->config(), "Compositing"); | 977 | KConfigGroup config(m_settings->config(), "Compositing"); | ||
965 | 978 | | |||
966 | setGlSmoothScale(qBound(-1, config.readEntry("GLTextureFilter", Options::defaultGlSmoothScale()), 2)); | 979 | setGlSmoothScale(qBound(-1, config.readEntry("GLTextureFilter", Options::defaultGlSmoothScale()), 2)); | ||
▲ Show 20 Lines • Show All 184 Lines • Show Last 20 Lines |