From 0b1a5ecb8f7f8338cffff5b2441116687d2bbb66 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Thu, 28 May 2009 14:46:05 -0700 Subject: [PATCH 1/3] Make RANDR 'set' timestamps follow client specified time. Bug 21987. The lastSetTime value which indicates when the configuration within the server was last changed was not getting set in the appropriate RandR requests. Signed-off-by: Keith Packard --- randr/rrcrtc.c | 3 ++- randr/rrscreen.c | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/randr/rrcrtc.c b/randr/rrcrtc.c index ec65a04..3bd0138 100644 --- a/randr/rrcrtc.c +++ b/randr/rrcrtc.c @@ -837,6 +837,7 @@ ProcRRSetCrtcConfig (ClientPtr client) goto sendReply; } rep.status = RRSetConfigSuccess; + pScrPriv->lastSetTime = time; sendReply: if (outputs) @@ -846,7 +847,7 @@ sendReply: /* rep.status has already been filled in */ rep.length = 0; rep.sequenceNumber = client->sequence; - rep.newTimestamp = pScrPriv->lastConfigTime.milliseconds; + rep.newTimestamp = pScrPriv->lastSetTime.milliseconds; if (client->swapped) { diff --git a/randr/rrscreen.c b/randr/rrscreen.c index f391973..6683731 100644 --- a/randr/rrscreen.c +++ b/randr/rrscreen.c @@ -921,8 +921,10 @@ ProcRRSetScreenConfig (ClientPtr client) if (!RRCrtcSet (crtc, mode, 0, 0, stuff->rotation, 1, &output)) rep.status = RRSetConfigFailed; - else + else { + pScreenPriv->lastSetTime = time; rep.status = RRSetConfigSuccess; + } /* * XXX Configure other crtcs to mirror as much as possible -- 1.6.0.2 From 33944b5fe72385b40ff9a8ed42394ce1687b3974 Mon Sep 17 00:00:00 2001 From: Federico Mena Quintero Date: Fri, 29 May 2009 13:57:05 -0500 Subject: [PATCH 2/3] Add missing fields to SRR*NotifyEvent() Also, remove redundant field swaps and make others match the order in which they are declared in the xRR*NotifyEvent structs. Signed-off-by: Federico Mena Quintero --- randr/randr.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/randr/randr.c b/randr/randr.c index bc2b995..77807d8 100644 --- a/randr/randr.c +++ b/randr/randr.c @@ -120,11 +120,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,7 +138,6 @@ 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); cpswaps(from->x, to->x); cpswaps(from->y, to->y); @@ -160,6 +159,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 +174,7 @@ SRROutputPropertyNotifyEvent(xRROutputPropertyNotifyEvent *from, cpswapl(from->output, to->output); cpswapl(from->atom, to->atom); cpswapl(from->timestamp, to->timestamp); + to->state = from->state; } static void -- 1.6.0.2 From 9834c1c5d27eedc28ff8e488c476f12487a1d749 Mon Sep 17 00:00:00 2001 From: Federico Mena Quintero Date: Fri, 29 May 2009 17:07:08 -0500 Subject: [PATCH 3/3] Fix field name --- randr/rrscreen.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/randr/rrscreen.c b/randr/rrscreen.c index 6683731..aa85a9b 100644 --- a/randr/rrscreen.c +++ b/randr/rrscreen.c @@ -922,7 +922,7 @@ ProcRRSetScreenConfig (ClientPtr client) if (!RRCrtcSet (crtc, mode, 0, 0, stuff->rotation, 1, &output)) rep.status = RRSetConfigFailed; else { - pScreenPriv->lastSetTime = time; + pScrPriv->lastSetTime = time; rep.status = RRSetConfigSuccess; } -- 1.6.0.2