[client,x11] fix orientation setting of rdpMonitor

This commit is contained in:
akallabeth
2026-01-29 22:19:05 +01:00
parent 0a8ab5724d
commit 123be8e009

View File

@@ -465,7 +465,23 @@ BOOL xf_detect_monitors(xfContext* xfc, UINT32* pMaxWidth, UINT32* pMaxHeight)
attrs->physicalHeight =
WINPR_ASSERTING_INT_CAST(uint32_t, rrmonitors[i].mheight);
ret = XRRRotations(xfc->display, WINPR_ASSERTING_INT_CAST(int, i), &rot);
attrs->orientation = ret;
switch (rot & ret)
{
case RR_Rotate_90:
attrs->orientation = ORIENTATION_PORTRAIT;
break;
case RR_Rotate_180:
attrs->orientation = ORIENTATION_LANDSCAPE_FLIPPED;
break;
case RR_Rotate_270:
attrs->orientation = ORIENTATION_PORTRAIT_FLIPPED;
break;
case RR_Rotate_0:
default:
attrs->orientation = ORIENTATION_LANDSCAPE;
break;
}
}
#endif