xserver: Branch 'master'
Dave Airlie
airlied at kemper.freedesktop.org
Tue Jan 2 00:18:59 EET 2007
randr/randr.c | 4 ++++
randr/randrstr.h | 1 +
randr/rrscreen.c | 6 +++++-
3 files changed, 10 insertions(+), 1 deletion(-)
New commits:
diff-tree 953a9ef949b4c57d28daeec57031fe1ce368c27c (from e79602fca2f2cced66136729cdda4d356b0bdda0)
Author: Keith Packard <keithp at guitar.keithp.com>
Date: Thu Dec 21 23:50:39 2006 -0800
Track physical screen size and send out updates when that changes.
Events and internal data structures need to be updated whenever the physical
or pixel size of the screen changes. The code was ignoring the physical
size, so changing only that would not be registered anywhere.
(cherry picked from f42e3cea236fa0091ed398a818fc8e17b0e1b3df commit)
diff --git a/randr/randr.c b/randr/randr.c
index 1470035..5fa9baf 100644
--- a/randr/randr.c
+++ b/randr/randr.c
@@ -243,6 +243,10 @@ Bool RRScreenInit(ScreenPtr pScreen)
pScrPriv->maxWidth = pScrPriv->minWidth = pScreen->width;
pScrPriv->maxHeight = pScrPriv->minHeight = pScreen->height;
+ pScrPriv->width = pScreen->width;
+ pScrPriv->height = pScreen->height;
+ pScrPriv->mmWidth = pScreen->mmWidth;
+ pScrPriv->mmHeight = pScreen->mmHeight;
#if RANDR_12_INTERFACE
pScrPriv->rrScreenSetSize = NULL;
pScrPriv->rrCrtcSet = NULL;
diff --git a/randr/randrstr.h b/randr/randrstr.h
index 88f7588..136a47e 100644
--- a/randr/randrstr.h
+++ b/randr/randrstr.h
@@ -224,6 +224,7 @@ typedef struct _rrScrPriv {
CARD16 minWidth, minHeight;
CARD16 maxWidth, maxHeight;
CARD16 width, height; /* last known screen size */
+ CARD16 mmWidth, mmHeight; /* last known screen size */
int numOutputs;
RROutputPtr *outputs;
diff --git a/randr/rrscreen.c b/randr/rrscreen.c
index 7947f80..e10aa03 100644
--- a/randr/rrscreen.c
+++ b/randr/rrscreen.c
@@ -158,11 +158,15 @@ RRScreenSizeNotify (ScreenPtr pScreen)
* pixel size
*/
if (pScrPriv->width == pScreen->width &&
- pScrPriv->height == pScreen->height)
+ pScrPriv->height == pScreen->height &&
+ pScrPriv->mmWidth == pScreen->mmWidth &&
+ pScrPriv->mmHeight == pScreen->mmHeight)
return;
pScrPriv->width = pScreen->width;
pScrPriv->height = pScreen->height;
+ pScrPriv->mmWidth = pScreen->mmWidth;
+ pScrPriv->mmHeight = pScreen->mmHeight;
pScrPriv->changed = TRUE;
/* pScrPriv->sizeChanged = TRUE; */
More information about the xorg-commit
mailing list