mirror of
https://github.com/X11Libre/xserver.git
synced 2026-09-28 21:33:09 +00:00
Move each screen's x/y origin into ScreenRec.
Many references to the dixScreenOrigins array already had the corresponding screen pointer handy, which meant they usually looked like "dixScreenOrigins[pScreen->myNum]". Adding a field to ScreenRec instead of keeping this information in a parallel array simplifies those expressions, and eliminates a MAXSCREENS-sized array. Since dix declared the dixScreenOrigins array, I figure allocating a screen private for these values is overkill. Signed-off-by: Jamey Sharp <jamey@minilop.net> Reviewed-by: Tiago Vignatti <tiago.vignatti@nokia.com> Tested-by: Tiago Vignatti <tiago.vignatti@nokia.com> (i686 GNU/Linux)
This commit is contained in:
parent
217ccaa5a3
commit
a83cff9f4d
28 changed files with 321 additions and 333 deletions
|
|
@ -259,8 +259,8 @@ void QuartzUpdateScreens(void) {
|
|||
PseudoramiXResetScreens();
|
||||
quartzProcs->AddPseudoramiXScreens(&x, &y, &width, &height);
|
||||
|
||||
dixScreenOrigins[pScreen->myNum].x = x;
|
||||
dixScreenOrigins[pScreen->myNum].y = y;
|
||||
pScreen->x = x;
|
||||
pScreen->y = y;
|
||||
pScreen->mmWidth = pScreen->mmWidth * ((double) width / pScreen->width);
|
||||
pScreen->mmHeight = pScreen->mmHeight * ((double) height / pScreen->height);
|
||||
pScreen->width = width;
|
||||
|
|
@ -269,11 +269,11 @@ void QuartzUpdateScreens(void) {
|
|||
DarwinAdjustScreenOrigins(&screenInfo);
|
||||
quartzProcs->UpdateScreen(pScreen);
|
||||
|
||||
/* DarwinAdjustScreenOrigins or UpdateScreen may change dixScreenOrigins,
|
||||
/* DarwinAdjustScreenOrigins or UpdateScreen may change pScreen->x/y,
|
||||
* so use it rather than x/y
|
||||
*/
|
||||
sx = dixScreenOrigins[pScreen->myNum].x + darwinMainScreenX;
|
||||
sy = dixScreenOrigins[pScreen->myNum].y + darwinMainScreenY;
|
||||
sx = pScreen->x + darwinMainScreenX;
|
||||
sy = pScreen->y + darwinMainScreenY;
|
||||
|
||||
/* Adjust the root window. */
|
||||
pRoot = pScreen->root;
|
||||
|
|
@ -292,7 +292,7 @@ void QuartzUpdateScreens(void) {
|
|||
inputInfo.pointer->spriteInfo->sprite->physLimits = bounds;
|
||||
inputInfo.pointer->spriteInfo->sprite->hotLimits = bounds;
|
||||
|
||||
DEBUG_LOG("Root Window: %dx%d @ (%d, %d) darwinMainScreen (%d, %d) xy (%d, %d) dixScreenOrigins (%d, %d)\n", width, height, x - sx, y - sy, darwinMainScreenX, darwinMainScreenY, x, y, dixScreenOrigins[pScreen->myNum].x, dixScreenOrigins[pScreen->myNum].y);
|
||||
DEBUG_LOG("Root Window: %dx%d @ (%d, %d) darwinMainScreen (%d, %d) xy (%d, %d) dixScreenOrigins (%d, %d)\n", width, height, x - sx, y - sy, darwinMainScreenX, darwinMainScreenY, x, y, pScreen->x, pScreen->y);
|
||||
|
||||
/* Send an event for the root reconfigure */
|
||||
e.u.u.type = ConfigureNotify;
|
||||
|
|
|
|||
Loading…
Reference in a new issue