randr: introduce rrCrtcGetInfo DDX function
This allows rrCrtcGetInfo to override the values in the XRRCrtcGetInfo reply. One use case is to allow Xwayland to return the current emulated mode for the specific client instead of the global mode. Signed-off-by: Minh Phan <phanquangminh217@gmail.com> Acked-by: Olivier Fourdan <ofourdan@redhat.com>
This commit is contained in:
parent
3cb3024fea
commit
5145742fb6
|
@ -74,7 +74,7 @@
|
|||
* mask is 0xFFFF0000.
|
||||
*/
|
||||
#define ABI_ANSIC_VERSION SET_ABI_VERSION(0, 4)
|
||||
#define ABI_VIDEODRV_VERSION SET_ABI_VERSION(26, 0)
|
||||
#define ABI_VIDEODRV_VERSION SET_ABI_VERSION(26, 6)
|
||||
#define ABI_XINPUT_VERSION SET_ABI_VERSION(24, 4)
|
||||
#define ABI_EXTENSION_VERSION SET_ABI_VERSION(10, 0)
|
||||
|
||||
|
|
|
@ -218,6 +218,10 @@ typedef Bool (*RRCrtcSetProcPtr) (ScreenPtr pScreen,
|
|||
Rotation rotation,
|
||||
int numOutputs, RROutputPtr * outputs);
|
||||
|
||||
typedef void (*RRCrtcGetProcPtr) (ScreenPtr pScreen,
|
||||
RRCrtcPtr crtc,
|
||||
xRRGetCrtcInfoReply *rep);
|
||||
|
||||
typedef Bool (*RRCrtcSetGammaProcPtr) (ScreenPtr pScreen, RRCrtcPtr crtc);
|
||||
|
||||
typedef Bool (*RRCrtcGetGammaProcPtr) (ScreenPtr pScreen, RRCrtcPtr crtc);
|
||||
|
@ -420,6 +424,10 @@ typedef struct _rrScrPriv {
|
|||
|
||||
RRRequestLeaseProcPtr rrRequestLease;
|
||||
RRGetLeaseProcPtr rrGetLease;
|
||||
|
||||
#if RANDR_12_INTERFACE
|
||||
RRCrtcGetProcPtr rrCrtcGet;
|
||||
#endif
|
||||
} rrScrPrivRec, *rrScrPrivPtr;
|
||||
|
||||
extern _X_EXPORT DevPrivateKeyRec rrPrivKeyRec;
|
||||
|
|
|
@ -1261,6 +1261,9 @@ ProcRRGetCrtcInfo(ClientPtr client)
|
|||
}
|
||||
}
|
||||
|
||||
if (pScrPriv->rrCrtcGet)
|
||||
pScrPriv->rrCrtcGet(pScreen, crtc, &rep);
|
||||
|
||||
if (client->swapped) {
|
||||
swaps(&rep.sequenceNumber);
|
||||
swapl(&rep.length);
|
||||
|
|
Loading…
Reference in New Issue