summaryrefslogtreecommitdiff
path: root/randr
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2012-05-29 14:35:24 +0100
committerDave Airlie <airlied@redhat.com>2012-07-07 10:37:11 +0100
commit26d848cb916c8a85f2c69d2aeb004665ba07bf00 (patch)
tree06e85c563949907ab1c0e4694d9ec34b6e83aac5 /randr
parent4bf0192d810e01c89a1903cc4bc5e639fc13a547 (diff)
randr: fix tellchanged to work with slave scanouts
Tell changed need to tell only for the master pixmap, however it gets called from various places for slave screens, so convert to telling clients about changes on the master screen. Reviewed-by: Keith Packard <keithp@keithp.com> Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'randr')
-rw-r--r--randr/randr.c26
1 files changed, 19 insertions, 7 deletions
diff --git a/randr/randr.c b/randr/randr.c
index 103c31e31..ae8116677 100644
--- a/randr/randr.c
+++ b/randr/randr.c
@@ -467,25 +467,37 @@ TellChanged(WindowPtr pWin, pointer value)
void
RRTellChanged(ScreenPtr pScreen)
{
+ ScreenPtr master;
rrScrPriv(pScreen);
+ rrScrPrivPtr mastersp;
int i;
+ if (pScreen->isGPU) {
+ master = pScreen->current_master;
+ mastersp = rrGetScrPriv(master);
+ }
+ else {
+ master = pScreen;
+ mastersp = pScrPriv;
+ }
+
if (pScrPriv->changed) {
UpdateCurrentTimeIf();
- if (pScrPriv->configChanged) {
- pScrPriv->lastConfigTime = currentTime;
- pScrPriv->configChanged = FALSE;
+ if (mastersp->configChanged) {
+ mastersp->lastConfigTime = currentTime;
+ mastersp->configChanged = FALSE;
}
pScrPriv->changed = FALSE;
- WalkTree(pScreen, TellChanged, (pointer) pScreen);
+ mastersp->changed = FALSE;
+ WalkTree(master, TellChanged, (pointer) master);
for (i = 0; i < pScrPriv->numOutputs; i++)
pScrPriv->outputs[i]->changed = FALSE;
for (i = 0; i < pScrPriv->numCrtcs; i++)
pScrPriv->crtcs[i]->changed = FALSE;
- if (pScrPriv->layoutChanged) {
+ if (mastersp->layoutChanged) {
pScrPriv->layoutChanged = FALSE;
- RRPointerScreenConfigured(pScreen);
- RRSendConfigNotify(pScreen);
+ RRPointerScreenConfigured(master);
+ RRSendConfigNotify(master);
}
}
}