summaryrefslogtreecommitdiff
path: root/randr
diff options
context:
space:
mode:
authorAlberto Milone <alberto.milone@canonical.com>2013-12-12 10:00:09 +0100
committerAdam Jackson <ajax@redhat.com>2015-10-21 15:13:22 -0400
commit702c0a247f5523b43652befaf6be548ddbbe9dee (patch)
tree408cde8b4b5ec380f30c64e559743fb875dff17c /randr
parent2092f12a243b9f7682f542b593b77c96d455ec89 (diff)
randr: make RROutputChanged change the main protocol screen not the gpu screen
We only set changes on the main protocol screen as, for example in RRSetChanged() and RRTellChanged(), therefore we should follow the same logic when reporting that an output changed in RROutputChanged(). This means that RRTellChanged() will then update the relevant timestamps also when events come from gpu screens. [ajax: Fix mixed code and decls] Reviewed-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Alberto Milone <alberto.milone@canonical.com>
Diffstat (limited to 'randr')
-rw-r--r--randr/rroutput.c22
1 files changed, 17 insertions, 5 deletions
diff --git a/randr/rroutput.c b/randr/rroutput.c
index 10df4da95..d12b9ba12 100644
--- a/randr/rroutput.c
+++ b/randr/rroutput.c
@@ -31,15 +31,27 @@ RESTYPE RROutputType;
void
RROutputChanged(RROutputPtr output, Bool configChanged)
{
+ /* set changed bits on the master screen only */
ScreenPtr pScreen = output->pScreen;
+ rrScrPrivPtr mastersp;
output->changed = TRUE;
- if (pScreen) {
- rrScrPriv(pScreen);
- RRSetChanged(pScreen);
- if (configChanged)
- pScrPriv->configChanged = TRUE;
+ if (!pScreen)
+ return;
+
+ if (pScreen->isGPU) {
+ ScreenPtr master = pScreen->current_master;
+ if (!master)
+ return;
+ mastersp = rrGetScrPriv(master);
+ }
+ else {
+ mastersp = rrGetScrPriv(pScreen);
}
+
+ RRSetChanged(pScreen);
+ if (configChanged)
+ mastersp->configChanged = TRUE;
}
/*