summaryrefslogtreecommitdiff
path: root/randr
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2013-01-09 14:23:57 +1000
committerDave Airlie <airlied@redhat.com>2013-04-30 10:08:43 +1000
commitf9c8248b8326ad01f33f31531c6b2479baf80f02 (patch)
treeb52d156e54876b5ee618111225638359bceac9d0 /randr
parent451ba4bd41b82acd4aec6236ba121e00cfeb311b (diff)
randr: don't directly set changed bits in randr screen
Introduce a wrapper interface so we can fix things up for multi-gpu situations later. This just introduces the API for now. Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'randr')
-rw-r--r--randr/randr.c8
-rw-r--r--randr/randrstr.h4
-rw-r--r--randr/rrcrtc.c2
-rw-r--r--randr/rrinfo.c2
-rw-r--r--randr/rroutput.c2
-rw-r--r--randr/rrscreen.c2
6 files changed, 16 insertions, 4 deletions
diff --git a/randr/randr.c b/randr/randr.c
index f0decfc6c..11f88b2b4 100644
--- a/randr/randr.c
+++ b/randr/randr.c
@@ -464,6 +464,14 @@ TellChanged(WindowPtr pWin, pointer value)
return WT_WALKCHILDREN;
}
+void
+RRSetChanged(ScreenPtr pScreen)
+{
+ rrScrPriv(pScreen);
+
+ pScrPriv->changed = TRUE;
+}
+
/*
* Something changed; send events and adjust pointer position
*/
diff --git a/randr/randrstr.h b/randr/randrstr.h
index 25174798f..2babfedd2 100644
--- a/randr/randrstr.h
+++ b/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/randr/rrcrtc.c b/randr/rrcrtc.c
index 721b05ac3..2f76b62be 100644
--- a/randr/rrcrtc.c
+++ b/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/randr/rrinfo.c b/randr/rrinfo.c
index 1408d6f64..fc57bd408 100644
--- a/randr/rrinfo.c
+++ b/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/randr/rroutput.c b/randr/rroutput.c
index 88781ba0f..922d61f3d 100644
--- a/randr/rroutput.c
+++ b/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/randr/rrscreen.c b/randr/rrscreen.c
index 39340ccee..36179ae89 100644
--- a/randr/rrscreen.c
+++ b/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);