summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-10-06 21:34:01 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-10-06 21:34:01 +0000
commit01037adf8e0d128496c502ca54ec4e297cac0528 (patch)
tree1f0a7459bead9b985bb13fdffdc0da5bd888c69d
parent70e11ae70b5095042e8eb795c1f67914d1e08922 (diff)
downloadtdelibs-01037adf8e0d128496c502ca54ec4e297cac0528.tar.gz
tdelibs-01037adf8e0d128496c502ca54ec4e297cac0528.zip
Part 2 of prior commit
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1257649 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
-rw-r--r--krandr/libkrandr.cc12
-rw-r--r--krandr/libkrandr.h2
2 files changed, 9 insertions, 5 deletions
diff --git a/krandr/libkrandr.cc b/krandr/libkrandr.cc
index 05268c327..c5ec9907e 100644
--- a/krandr/libkrandr.cc
+++ b/krandr/libkrandr.cc
@@ -481,7 +481,7 @@ TQPoint KRandrSimpleAPI::applySystemwideDisplayConfiguration(TQString profilenam
TQPtrList<SingleScreenData> screenInfoArray;
screenInfoArray = loadSystemwideDisplayConfiguration(profilename, kde_confdir);
if (screenInfoArray.count() > 0) {
- applySystemwideDisplayConfiguration(screenInfoArray, FALSE);
+ applySystemwideDisplayConfiguration(screenInfoArray, FALSE, kde_confdir);
}
destroyScreenInformationObject(screenInfoArray);
screenInfoArray = readCurrentDisplayConfiguration();
@@ -576,7 +576,7 @@ int KRandrSimpleAPI::getHardwareRotationFlags(SingleScreenData* screendata) {
#define USE_XRANDR_PROGRAM
-bool KRandrSimpleAPI::applySystemwideDisplayConfiguration(TQPtrList<SingleScreenData> screenInfoArray, bool test) {
+bool KRandrSimpleAPI::applySystemwideDisplayConfiguration(TQPtrList<SingleScreenData> screenInfoArray, bool test, TQString kde_confdir) {
int i;
int j;
bool accepted = true;
@@ -634,7 +634,7 @@ bool KRandrSimpleAPI::applySystemwideDisplayConfiguration(TQPtrList<SingleScreen
TQString xrandr_command_output = exec(command.ascii());
xrandr_command_output = xrandr_command_output.stripWhiteSpace();
if (xrandr_command_output != "") {
- applySystemwideDisplayConfiguration(oldconfig, FALSE);
+ applySystemwideDisplayConfiguration(oldconfig, FALSE, kde_confdir);
accepted = false;
destroyScreenInformationObject(oldconfig);
KMessageBox::sorry(0, xrandr_command_output, i18n("XRandR encountered a problem"));
@@ -745,11 +745,14 @@ bool KRandrSimpleAPI::applySystemwideDisplayConfiguration(TQPtrList<SingleScreen
applySystemwideDisplayGamma(screenInfoArray);
applySystemwideDisplayDPMS(screenInfoArray);
+ TQString current_icc_profile = getCurrentProfile();
+ applySystemWideIccConfiguration(kde_confdir);
+ applyIccConfiguration(current_icc_profile, kde_confdir);
if (test == TRUE) {
int ret = showTestConfigurationDialog();
if (!ret) {
- applySystemwideDisplayConfiguration(oldconfig, FALSE);
+ applySystemwideDisplayConfiguration(oldconfig, FALSE, kde_confdir);
accepted = false;
}
destroyScreenInformationObject(oldconfig);
@@ -1040,6 +1043,7 @@ TQPtrList<SingleScreenData> KRandrSimpleAPI::readCurrentDisplayConfiguration() {
}
// Get DPMS information
+ screendata->has_dpms = 1; // [FIXME] Master Xorg check for global DPMS support should go here if possible
if (screendata->has_dpms) {
CARD16 dpms_standby_delay;
CARD16 dpms_suspend_delay;
diff --git a/krandr/libkrandr.h b/krandr/libkrandr.h
index f2a60340a..72dd9d43f 100644
--- a/krandr/libkrandr.h
+++ b/krandr/libkrandr.h
@@ -194,7 +194,7 @@ class KRANDR_EXPORT KRandrSimpleAPI : public RandRDisplay
* If test is true, the new configuration will be loaded for a short period of time, then reverted automatically
* Returns true if configuration was accepted; false if not
*/
- bool applySystemwideDisplayConfiguration(TQPtrList<SingleScreenData> screenInfoArray, bool test=TRUE);
+ bool applySystemwideDisplayConfiguration(TQPtrList<SingleScreenData> screenInfoArray, bool test=TRUE, TQString kde_confdir="");
/**
* Applies the gamma contained within the systemwide display configuration screenInfoArray to the hardware