mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-01-03 18:40:12 +01:00
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.
This commit is contained in:
parent
91396f1430
commit
f42e3cea23
3 changed files with 10 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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; */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue