outputconfigurationstore: take rotation into account for the position

Otherwise outputs may overlap
This commit is contained in:
Xaver Hugl 2024-01-22 22:35:15 +01:00
parent 575ff68e5b
commit 7a2d95ddc8

View file

@ -412,7 +412,8 @@ std::pair<OutputConfiguration, QList<Output *>> OutputConfigurationStore::genera
.autoRotationPolicy = existingData.autoRotation.value_or(Output::AutoRotationPolicy::InTabletMode),
};
if (enable) {
pos.setX(std::ceil(pos.x() + changeset->mode.value_or(output->currentMode()).lock()->size().width() / changeset->scale.value_or(output->scale())));
const auto modeSize = changeset->transform->map(mode->size());
pos.setX(std::ceil(pos.x() + modeSize.width() / *changeset->scale));
outputOrder.push_back(output);
}
}