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-ecb5cbfe19
tpearson 7 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
633 633
 
634 634
 		TQString xrandr_command_output = exec(command.ascii());
635 635
 		xrandr_command_output = xrandr_command_output.stripWhiteSpace();
636
-		if (xrandr_command_output != "") {
637
-			applySystemwideDisplayConfiguration(oldconfig, FALSE, kde_confdir);
638
-			accepted = false;
639
-			destroyScreenInformationObject(oldconfig);
640
-			KMessageBox::sorry(0, xrandr_command_output, i18n("XRandR encountered a problem"));
641
-			return accepted;
636
+		if (test) {
637
+			if (xrandr_command_output != "") {
638
+				applySystemwideDisplayConfiguration(oldconfig, FALSE, kde_confdir);
639
+				accepted = false;
640
+				destroyScreenInformationObject(oldconfig);
641
+				KMessageBox::sorry(0, xrandr_command_output, i18n("XRandR encountered a problem"));
642
+				return accepted;
643
+			}
642 644
 		}
643 645
 
644 646
 		// HACK

Loading…
Cancel
Save