mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-15 00:44:19 +09:00
[client,x11] fix orientation setting of rdpMonitor
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user