|
|
@ -481,7 +481,7 @@ TQPoint KRandrSimpleAPI::applySystemwideDisplayConfiguration(TQString profilenam
|
|
|
|
TQPtrList<SingleScreenData> screenInfoArray;
|
|
|
|
TQPtrList<SingleScreenData> screenInfoArray;
|
|
|
|
screenInfoArray = loadSystemwideDisplayConfiguration(profilename, kde_confdir);
|
|
|
|
screenInfoArray = loadSystemwideDisplayConfiguration(profilename, kde_confdir);
|
|
|
|
if (screenInfoArray.count() > 0) {
|
|
|
|
if (screenInfoArray.count() > 0) {
|
|
|
|
applySystemwideDisplayConfiguration(screenInfoArray, FALSE);
|
|
|
|
applySystemwideDisplayConfiguration(screenInfoArray, FALSE, kde_confdir);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
destroyScreenInformationObject(screenInfoArray);
|
|
|
|
destroyScreenInformationObject(screenInfoArray);
|
|
|
|
screenInfoArray = readCurrentDisplayConfiguration();
|
|
|
|
screenInfoArray = readCurrentDisplayConfiguration();
|
|
|
@ -576,7 +576,7 @@ int KRandrSimpleAPI::getHardwareRotationFlags(SingleScreenData* screendata) {
|
|
|
|
|
|
|
|
|
|
|
|
#define USE_XRANDR_PROGRAM
|
|
|
|
#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 i;
|
|
|
|
int j;
|
|
|
|
int j;
|
|
|
|
bool accepted = true;
|
|
|
|
bool accepted = true;
|
|
|
@ -634,7 +634,7 @@ bool KRandrSimpleAPI::applySystemwideDisplayConfiguration(TQPtrList<SingleScreen
|
|
|
|
TQString xrandr_command_output = exec(command.ascii());
|
|
|
|
TQString xrandr_command_output = exec(command.ascii());
|
|
|
|
xrandr_command_output = xrandr_command_output.stripWhiteSpace();
|
|
|
|
xrandr_command_output = xrandr_command_output.stripWhiteSpace();
|
|
|
|
if (xrandr_command_output != "") {
|
|
|
|
if (xrandr_command_output != "") {
|
|
|
|
applySystemwideDisplayConfiguration(oldconfig, FALSE);
|
|
|
|
applySystemwideDisplayConfiguration(oldconfig, FALSE, kde_confdir);
|
|
|
|
accepted = false;
|
|
|
|
accepted = false;
|
|
|
|
destroyScreenInformationObject(oldconfig);
|
|
|
|
destroyScreenInformationObject(oldconfig);
|
|
|
|
KMessageBox::sorry(0, xrandr_command_output, i18n("XRandR encountered a problem"));
|
|
|
|
KMessageBox::sorry(0, xrandr_command_output, i18n("XRandR encountered a problem"));
|
|
|
@ -745,11 +745,14 @@ bool KRandrSimpleAPI::applySystemwideDisplayConfiguration(TQPtrList<SingleScreen
|
|
|
|
|
|
|
|
|
|
|
|
applySystemwideDisplayGamma(screenInfoArray);
|
|
|
|
applySystemwideDisplayGamma(screenInfoArray);
|
|
|
|
applySystemwideDisplayDPMS(screenInfoArray);
|
|
|
|
applySystemwideDisplayDPMS(screenInfoArray);
|
|
|
|
|
|
|
|
TQString current_icc_profile = getCurrentProfile();
|
|
|
|
|
|
|
|
applySystemWideIccConfiguration(kde_confdir);
|
|
|
|
|
|
|
|
applyIccConfiguration(current_icc_profile, kde_confdir);
|
|
|
|
|
|
|
|
|
|
|
|
if (test == TRUE) {
|
|
|
|
if (test == TRUE) {
|
|
|
|
int ret = showTestConfigurationDialog();
|
|
|
|
int ret = showTestConfigurationDialog();
|
|
|
|
if (!ret) {
|
|
|
|
if (!ret) {
|
|
|
|
applySystemwideDisplayConfiguration(oldconfig, FALSE);
|
|
|
|
applySystemwideDisplayConfiguration(oldconfig, FALSE, kde_confdir);
|
|
|
|
accepted = false;
|
|
|
|
accepted = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
destroyScreenInformationObject(oldconfig);
|
|
|
|
destroyScreenInformationObject(oldconfig);
|
|
|
@ -1040,6 +1043,7 @@ TQPtrList<SingleScreenData> KRandrSimpleAPI::readCurrentDisplayConfiguration() {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Get DPMS information
|
|
|
|
// Get DPMS information
|
|
|
|
|
|
|
|
screendata->has_dpms = 1; // [FIXME] Master Xorg check for global DPMS support should go here if possible
|
|
|
|
if (screendata->has_dpms) {
|
|
|
|
if (screendata->has_dpms) {
|
|
|
|
CARD16 dpms_standby_delay;
|
|
|
|
CARD16 dpms_standby_delay;
|
|
|
|
CARD16 dpms_suspend_delay;
|
|
|
|
CARD16 dpms_suspend_delay;
|
|
|
|