[PATCH 26/36] randr: fix tellchanged to work with slave scanouts
Dave Airlie
airlied at gmail.com
Mon Jul 2 03:13:19 PDT 2012
From: Dave Airlie <airlied at redhat.com>
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.
Signed-off-by: Dave Airlie <airlied at redhat.com>
---
randr/randr.c | 26 +++++++++++++++++++-------
1 file changed, 19 insertions(+), 7 deletions(-)
diff --git a/randr/randr.c b/randr/randr.c
index e82f718..cfcc016 100644
--- a/randr/randr.c
+++ b/randr/randr.c
@@ -468,25 +468,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);
}
}
}
--
1.7.10.2
More information about the xorg-devel
mailing list