Browse Source

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
tags/v3.5.13
tpearson 8 years ago
parent
commit
10868e2434
1 changed files with 8 additions and 6 deletions
  1. 8
    6
      krandr/libkrandr.cc

+ 8
- 6
krandr/libkrandr.cc View File

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

// HACK

Loading…
Cancel
Save