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>
fix/tde-75
Alexander Golubev 5 months ago
parent 44e712a770
commit ac6c53f3fa

@ -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()

Loading…
Cancel
Save