aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/randr/randr.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/randr/randr.c')
-rw-r--r--xorg-server/randr/randr.c27
1 files changed, 17 insertions, 10 deletions
diff --git a/xorg-server/randr/randr.c b/xorg-server/randr/randr.c
index bc2b995d2..5bcb3597a 100644
--- a/xorg-server/randr/randr.c
+++ b/xorg-server/randr/randr.c
@@ -56,9 +56,11 @@ static int SProcRRDispatch (ClientPtr pClient);
int RREventBase;
int RRErrorBase;
RESTYPE RRClientType, RREventType; /* resource types for event masks */
-DevPrivateKey RRClientPrivateKey = &RRClientPrivateKey;
+static int RRClientPrivateKeyIndex;
+DevPrivateKey RRClientPrivateKey = &RRClientPrivateKeyIndex;
-DevPrivateKey rrPrivKey = &rrPrivKey;
+static int rrPrivKeyIndex;
+DevPrivateKey rrPrivKey = &rrPrivKeyIndex;
static void
RRClientCallback (CallbackListPtr *list,
@@ -86,11 +88,6 @@ RRClientCallback (CallbackListPtr *list,
}
}
-static void
-RRResetProc (ExtensionEntry *extEntry)
-{
-}
-
static Bool
RRCloseScreen (int i, ScreenPtr pScreen)
{
@@ -120,11 +117,11 @@ SRRScreenChangeNotifyEvent(xRRScreenChangeNotifyEvent *from,
cpswapl(from->root, to->root);
cpswapl(from->window, to->window);
cpswaps(from->sizeID, to->sizeID);
+ cpswaps(from->subpixelOrder, to->subpixelOrder);
cpswaps(from->widthInPixels, to->widthInPixels);
cpswaps(from->heightInPixels, to->heightInPixels);
cpswaps(from->widthInMillimeters, to->widthInMillimeters);
cpswaps(from->heightInMillimeters, to->heightInMillimeters);
- cpswaps(from->subpixelOrder, to->subpixelOrder);
}
static void
@@ -138,8 +135,8 @@ SRRCrtcChangeNotifyEvent(xRRCrtcChangeNotifyEvent *from,
cpswapl(from->window, to->window);
cpswapl(from->crtc, to->crtc);
cpswapl(from->mode, to->mode);
- cpswapl(from->window, to->window);
cpswaps(from->rotation, to->rotation);
+ /* pad1 */
cpswaps(from->x, to->x);
cpswaps(from->y, to->y);
cpswaps(from->width, to->width);
@@ -160,6 +157,8 @@ SRROutputChangeNotifyEvent(xRROutputChangeNotifyEvent *from,
cpswapl(from->crtc, to->crtc);
cpswapl(from->mode, to->mode);
cpswaps(from->rotation, to->rotation);
+ to->connection = from->connection;
+ to->subpixelOrder = from->subpixelOrder;
}
static void
@@ -173,6 +172,11 @@ SRROutputPropertyNotifyEvent(xRROutputPropertyNotifyEvent *from,
cpswapl(from->output, to->output);
cpswapl(from->atom, to->atom);
cpswapl(from->timestamp, to->timestamp);
+ to->state = from->state;
+ /* pad1 */
+ /* pad2 */
+ /* pad3 */
+ /* pad4 */
}
static void
@@ -339,7 +343,7 @@ RRExtensionInit (void)
return;
extEntry = AddExtension (RANDR_NAME, RRNumberEvents, RRNumberErrors,
ProcRRDispatch, SProcRRDispatch,
- RRResetProc, StandardMinorOpcode);
+ NULL, StandardMinorOpcode);
if (!extEntry)
return;
RRErrorBase = extEntry->errorBase;
@@ -441,6 +445,9 @@ RRFirstOutput (ScreenPtr pScreen)
RROutputPtr output;
int i, j;
+ if (pScrPriv->primaryOutput && pScrPriv->primaryOutput->crtc)
+ return pScrPriv->primaryOutput;
+
for (i = 0; i < pScrPriv->numCrtcs; i++)
{
RRCrtcPtr crtc = pScrPriv->crtcs[i];