mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-04-07 10:00:39 +02:00
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>
(cherry picked from commit 5145742fb6)
This commit is contained in:
parent
cedf933c7c
commit
7d039914ff
2 changed files with 11 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -1269,6 +1269,9 @@ ProcRRGetCrtcInfo(ClientPtr client)
|
|||
}
|
||||
}
|
||||
|
||||
if (pScrPriv->rrCrtcGet)
|
||||
pScrPriv->rrCrtcGet(pScreen, crtc, &rep);
|
||||
|
||||
if (client->swapped) {
|
||||
swaps(&rep.sequenceNumber);
|
||||
swapl(&rep.length);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue