mirror of
https://github.com/hyprwm/hyprlock.git
synced 2024-12-22 13:29:48 +01:00
core: add support for 90/270 degree rotated monitors (#26)
This commit is contained in:
parent
a756d761eb
commit
7b15d34f0a
1 changed files with 7 additions and 1 deletions
|
@ -11,6 +11,12 @@ static void handleGeometry(void* data, wl_output* output, int32_t x, int32_t y,
|
|||
|
||||
static void handleMode(void* data, wl_output* output, uint32_t flags, int32_t width, int32_t height, int32_t refresh) {
|
||||
const auto POUTPUT = (COutput*)data;
|
||||
|
||||
// handle portrait mode and flipped cases
|
||||
if (POUTPUT->transform == WL_OUTPUT_TRANSFORM_270 || POUTPUT->transform == WL_OUTPUT_TRANSFORM_90 ||
|
||||
POUTPUT->transform == WL_OUTPUT_TRANSFORM_FLIPPED_270 || POUTPUT->transform == WL_OUTPUT_TRANSFORM_FLIPPED_90)
|
||||
POUTPUT->size = {height, width};
|
||||
else
|
||||
POUTPUT->size = {width, height};
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue