Commit 26d848cb authored by Dave Airlie's avatar Dave Airlie

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's avatarKeith Packard <keithp@keithp.com>
Reviewed-by: Adam Jackson's avatarAdam Jackson <ajax@redhat.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 4bf0192d
......@@ -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);
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment