diff options
author | Dave Airlie <airlied@redhat.com> | 2012-05-29 14:35:24 +0100 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2012-06-05 15:26:40 +0100 |
commit | 50ec521f6ec3da820f9b54e8e9f9c3604378d490 (patch) | |
tree | 7a04ee70b2505198e1dc2056983183d03034b1be | |
parent | abf2fb8798954ef3608b03e5fc6c49cc60e92c3a (diff) |
randr: fix tellchanged to work with slave scanouts
-rw-r--r-- | randr/randr.c | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/randr/randr.c b/randr/randr.c index a64aae366..7583d70de 100644 --- a/randr/randr.c +++ b/randr/randr.c @@ -412,25 +412,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) { UpdateCurrentTime(); - 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); } } } |