summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Golubev <fatzer2@gmail.com>2023-12-24 11:04:00 +0300
committerAlexander Golubev <fatzer2@gmail.com>2023-12-24 11:04:00 +0300
commitac6c53f3fa24444a902adaf7f904b320ef327ec5 (patch)
tree9b9efc2cfc688c5a351174c4d8acfa07408eebf4
parent44e712a770ad0ab59d33790a80b5f6235cff6921 (diff)
downloadtdelibs-ac6c53f3fa24444a902adaf7f904b320ef327ec5.tar.gz
tdelibs-ac6c53f3fa24444a902adaf7f904b320ef327ec5.zip
tderandr: fix saving screen reflaction
The conditions for screen reflection when saved was always evaluated as false and generally were incorrect. The problem was previausly unnoticed. Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
-rw-r--r--tderandr/randr.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/tderandr/randr.cpp b/tderandr/randr.cpp
index d00641154..6a3d0381e 100644
--- a/tderandr/randr.cpp
+++ b/tderandr/randr.cpp
@@ -656,7 +656,9 @@ KDE_EXPORT void RandRScreen::load(TDEConfig& config)
if (proposeSize(sizeIndex(TQSize(config.readNumEntry("width", currentPixelWidth()), config.readNumEntry("height", currentPixelHeight())))))
proposeRefreshRate(refreshRateHzToIndex(proposedSize(), config.readNumEntry("refresh", currentRefreshRate())));
- proposeRotation(rotationDegreeToIndex(config.readNumEntry("rotation", 0)) + (config.readBoolEntry("reflectX") ? ReflectX : 0) + (config.readBoolEntry("reflectY") ? ReflectY : 0));
+ proposeRotation(rotationDegreeToIndex(config.readNumEntry("rotation", 0))
+ | (config.readBoolEntry("reflectX") ? ReflectX : 0)
+ | (config.readBoolEntry("reflectY") ? ReflectY : 0));
}
KDE_EXPORT void RandRScreen::save(TDEConfig& config) const
@@ -666,8 +668,8 @@ KDE_EXPORT void RandRScreen::save(TDEConfig& config) const
config.writeEntry("height", currentPixelHeight());
config.writeEntry("refresh", refreshRateIndexToHz(currentSize(), currentRefreshRate()));
config.writeEntry("rotation", rotationIndexToDegree(currentRotation()));
- config.writeEntry("reflectX", (bool)(currentRotation() & ReflectMask) == ReflectX);
- config.writeEntry("reflectY", (bool)(currentRotation() & ReflectMask) == ReflectY);
+ config.writeEntry("reflectX", (bool)(currentRotation() & ReflectX));
+ config.writeEntry("reflectY", (bool)(currentRotation() & ReflectY));
}
KDE_EXPORT RandRDisplay::RandRDisplay()