diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-10-08 04:03:47 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-10-08 04:03:47 +0000 |
commit | 10868e2434cc7ca3be30630780a5a4b7b4cd0705 (patch) | |
tree | 59375529d580339bee66f6441719e88f6979f89c /krandr/libkrandr.cc | |
parent | 01037adf8e0d128496c502ca54ec4e297cac0528 (diff) | |
download | tdelibs-10868e2434cc7ca3be30630780a5a4b7b4cd0705.tar.gz tdelibs-10868e2434cc7ca3be30630780a5a4b7b4cd0705.zip |
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
Diffstat (limited to 'krandr/libkrandr.cc')
-rw-r--r-- | krandr/libkrandr.cc | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/krandr/libkrandr.cc b/krandr/libkrandr.cc index c5ec9907e..86f8e6bd0 100644 --- a/krandr/libkrandr.cc +++ b/krandr/libkrandr.cc @@ -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 |