Prevent recursive loop if XRandR returns a warning or error message during application of settings outside of Settings Test mode

git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1257816 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
v3.5.13-sru
tpearson 13 years ago
parent 01037adf8e
commit 10868e2434

@ -633,12 +633,14 @@ 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 (test) {
applySystemwideDisplayConfiguration(oldconfig, FALSE, kde_confdir); if (xrandr_command_output != "") {
accepted = false; applySystemwideDisplayConfiguration(oldconfig, FALSE, kde_confdir);
destroyScreenInformationObject(oldconfig); accepted = false;
KMessageBox::sorry(0, xrandr_command_output, i18n("XRandR encountered a problem")); destroyScreenInformationObject(oldconfig);
return accepted; KMessageBox::sorry(0, xrandr_command_output, i18n("XRandR encountered a problem"));
return accepted;
}
} }
// HACK // HACK

Loading…
Cancel
Save