implement wl_output_transform

This commit is contained in:
caffeine01 2024-12-17 00:54:54 +00:00
parent eb9db3b815
commit ecab9e7291
2 changed files with 8 additions and 0 deletions

View file

@ -21,4 +21,11 @@ void SMonitor::registerListeners() {
description = desc;
});
output->setGeometry([this](CCWlOutput* r, int32_t x, int32_t y, int32_t width_mm, int32_t height_mm, int32_t subpixel, const char* make, const char* model,
int32_t transform_) { //
transform = (wl_output_transform)transform_;
if (transform == WL_OUTPUT_TRANSFORM_90 || transform == WL_OUTPUT_TRANSFORM_270)
std::swap(size.x, size.y);
});
}

View file

@ -12,6 +12,7 @@ struct SMonitor {
uint32_t wayland_name = 0;
Vector2D size;
int scale;
wl_output_transform transform = WL_OUTPUT_TRANSFORM_NORMAL;
bool readyForLS = false;
bool hasATarget = true;