diff options
Diffstat (limited to 'xorg-server/randr')
-rw-r--r-- | xorg-server/randr/randr.c | 24 | ||||
-rw-r--r-- | xorg-server/randr/randrstr.h | 4 | ||||
-rw-r--r-- | xorg-server/randr/rrcrtc.c | 2 | ||||
-rw-r--r-- | xorg-server/randr/rrinfo.c | 2 | ||||
-rw-r--r-- | xorg-server/randr/rroutput.c | 2 | ||||
-rw-r--r-- | xorg-server/randr/rrscreen.c | 2 |
6 files changed, 31 insertions, 5 deletions
diff --git a/xorg-server/randr/randr.c b/xorg-server/randr/randr.c index f0decfc6c..cb6fce7cd 100644 --- a/xorg-server/randr/randr.c +++ b/xorg-server/randr/randr.c @@ -464,6 +464,28 @@ TellChanged(WindowPtr pWin, pointer value) return WT_WALKCHILDREN; } +void +RRSetChanged(ScreenPtr pScreen) +{ + /* set changed bits on the master screen only */ + ScreenPtr master; + rrScrPriv(pScreen); + rrScrPrivPtr mastersp; + + if (pScreen->isGPU) { + master = pScreen->current_master; + if (!master) + return; + mastersp = rrGetScrPriv(master); + } + else { + master = pScreen; + mastersp = pScrPriv; + } + + mastersp->changed = TRUE; +} + /* * Something changed; send events and adjust pointer position */ @@ -484,7 +506,7 @@ RRTellChanged(ScreenPtr pScreen) mastersp = pScrPriv; } - if (pScrPriv->changed) { + if (mastersp->changed) { UpdateCurrentTimeIf(); if (mastersp->configChanged) { mastersp->lastConfigTime = currentTime; diff --git a/xorg-server/randr/randrstr.h b/xorg-server/randr/randrstr.h index 25174798f..2babfedd2 100644 --- a/xorg-server/randr/randrstr.h +++ b/xorg-server/randr/randrstr.h @@ -486,6 +486,10 @@ extern _X_EXPORT void RRDeliverScreenEvent(ClientPtr client, WindowPtr pWin, ScreenPtr pScreen); /* randr.c */ +/* set a screen change on the primary screen */ +extern _X_EXPORT void +RRSetChanged(ScreenPtr pScreen); + /* * Send all pending events */ diff --git a/xorg-server/randr/rrcrtc.c b/xorg-server/randr/rrcrtc.c index 721b05ac3..2f76b62be 100644 --- a/xorg-server/randr/rrcrtc.c +++ b/xorg-server/randr/rrcrtc.c @@ -39,7 +39,7 @@ RRCrtcChanged(RRCrtcPtr crtc, Bool layoutChanged) if (pScreen) { rrScrPriv(pScreen); - pScrPriv->changed = TRUE; + RRSetChanged(pScreen); /* * Send ConfigureNotify on any layout change */ diff --git a/xorg-server/randr/rrinfo.c b/xorg-server/randr/rrinfo.c index 1408d6f64..fc57bd408 100644 --- a/xorg-server/randr/rrinfo.c +++ b/xorg-server/randr/rrinfo.c @@ -225,7 +225,7 @@ RRScreenSetSizeRange(ScreenPtr pScreen, pScrPriv->minHeight = minHeight; pScrPriv->maxWidth = maxWidth; pScrPriv->maxHeight = maxHeight; - pScrPriv->changed = TRUE; + RRSetChanged(pScreen); pScrPriv->configChanged = TRUE; } diff --git a/xorg-server/randr/rroutput.c b/xorg-server/randr/rroutput.c index 88781ba0f..922d61f3d 100644 --- a/xorg-server/randr/rroutput.c +++ b/xorg-server/randr/rroutput.c @@ -36,7 +36,7 @@ RROutputChanged(RROutputPtr output, Bool configChanged) output->changed = TRUE; if (pScreen) { rrScrPriv(pScreen); - pScrPriv->changed = TRUE; + RRSetChanged(pScreen); if (configChanged) pScrPriv->configChanged = TRUE; } diff --git a/xorg-server/randr/rrscreen.c b/xorg-server/randr/rrscreen.c index 39340ccee..36179ae89 100644 --- a/xorg-server/randr/rrscreen.c +++ b/xorg-server/randr/rrscreen.c @@ -143,7 +143,7 @@ RRScreenSizeNotify(ScreenPtr pScreen) pScrPriv->height = pScreen->height; pScrPriv->mmWidth = pScreen->mmWidth; pScrPriv->mmHeight = pScreen->mmHeight; - pScrPriv->changed = TRUE; + RRSetChanged(pScreen); /* pScrPriv->sizeChanged = TRUE; */ RRTellChanged(pScreen); |