diff options
author | Kevin E Martin <kem@kem.org> | 2004-06-30 20:06:56 +0000 |
---|---|---|
committer | Kevin E Martin <kem@kem.org> | 2004-06-30 20:06:56 +0000 |
commit | 7976ee51afcad41b611e642d2feb31d805dedcf6 (patch) | |
tree | 218e5c900399e880dd01458154896d011a2ff238 /dix | |
parent | d5db59bd79f5d8788b99056bf9d969b5b3ad99e1 (diff) |
Add Distributed Multihead X (DMX) support
Diffstat (limited to 'dix')
-rw-r--r-- | dix/events.c | 42 | ||||
-rw-r--r-- | dix/main.c | 23 |
2 files changed, 60 insertions, 5 deletions
diff --git a/dix/events.c b/dix/events.c index b27450409..956594d8a 100644 --- a/dix/events.c +++ b/dix/events.c @@ -1,4 +1,4 @@ -/* $XdotOrg$ */ +/* $XdotOrg: xc/programs/Xserver/dix/events.c,v 1.2 2004/04/23 19:04:44 eich Exp $ */ /* $XFree86: xc/programs/Xserver/dix/events.c,v 3.51 2004/01/12 17:04:52 tsi Exp $ */ /************************************************************ @@ -2036,6 +2036,46 @@ WindowsRestructured() (void) CheckMotion((xEvent *)NULL); } +#ifdef PANORAMIX +/* This was added to support reconfiguration under Xdmx. The problem is + * that if the 0th screen (i.e., WindowTable[0]) is moved to an origin + * other than 0,0, the information in the private sprite structure must + * be updated accordingly, or XYToWindow (and other routines) will not + * compute correctly. */ +void ReinitializeRootWindow(WindowPtr win, int xoff, int yoff) +{ + ScreenPtr pScreen = win->drawable.pScreen; + GrabPtr grab; + + if (noPanoramiXExtension) return; + + sprite.hot.x -= xoff; + sprite.hot.y -= yoff; + + sprite.hotPhys.x -= xoff; + sprite.hotPhys.y -= yoff; + + sprite.hotLimits.x1 -= xoff; + sprite.hotLimits.y1 -= yoff; + sprite.hotLimits.x2 -= xoff; + sprite.hotLimits.y2 -= yoff; + + if (REGION_NOTEMPTY(sprite.screen, &sprite.Reg1)) + REGION_TRANSLATE(sprite.screen, &sprite.Reg1, xoff, yoff); + if (REGION_NOTEMPTY(sprite.screen, &sprite.Reg2)) + REGION_TRANSLATE(sprite.screen, &sprite.Reg2, xoff, yoff); + + /* FIXME: if we call ConfineCursorToWindow, must we do anything else? */ + if ((grab = inputInfo.pointer->grab) && grab->confineTo) { + if (grab->confineTo->drawable.pScreen != sprite.hotPhys.pScreen) + sprite.hotPhys.x = sprite.hotPhys.y = 0; + ConfineCursorToWindow(grab->confineTo, TRUE, TRUE); + } else + ConfineCursorToWindow(WindowTable[sprite.hotPhys.pScreen->myNum], + TRUE, FALSE); +} +#endif + void DefineInitialRootWindow(win) register WindowPtr win; diff --git a/dix/main.c b/dix/main.c index a5814849d..2a930d9dc 100644 --- a/dix/main.c +++ b/dix/main.c @@ -1,4 +1,4 @@ -/* $XdotOrg: xc/programs/Xserver/dix/main.c,v 1.1.4.5.2.4.6.1 2004/04/20 03:27:08 gisburn Exp $ */ +/* $XdotOrg: xc/programs/Xserver/dix/main.c,v 1.2 2004/04/23 19:04:44 eich Exp $ */ /* $XFree86: xc/programs/Xserver/dix/main.c,v 3.43 2003/10/30 21:21:02 herrb Exp $ */ /*********************************************************** @@ -500,6 +500,21 @@ main(int argc, char *argv[], char *envp[]) return(0); } +static int VendorRelease = VENDOR_RELEASE; +static char *VendorString = VENDOR_STRING; + +void +SetVendorRelease(int release) +{ + VendorRelease = release; +} + +void +SetVendorString(char *string) +{ + VendorString = string; +} + static int padlength[4] = {0, 3, 2, 1}; #ifndef PANORAMIX @@ -523,7 +538,7 @@ CreateConnectionBlock() /* Leave off the ridBase and ridMask, these must be sent with connection */ - setup.release = VENDOR_RELEASE; + setup.release = VendorRelease; /* * per-server image and bitmap parameters are defined in Xmd.h */ @@ -535,7 +550,7 @@ CreateConnectionBlock() setup.bitmapBitOrder = screenInfo.bitmapBitOrder; setup.motionBufferSize = NumMotionEvents(); setup.numRoots = screenInfo.numScreens; - setup.nbytesVendor = strlen(VENDOR_STRING); + setup.nbytesVendor = strlen(VendorString); setup.numFormats = screenInfo.numPixmapFormats; setup.maxRequestSize = MAX_REQUEST_SIZE; QueryMinMaxKeyCodes(&setup.minKeyCode, &setup.maxKeyCode); @@ -552,7 +567,7 @@ CreateConnectionBlock() sizesofar = sizeof(xConnSetup); pBuf = ConnectionInfo + sizeof(xConnSetup); - memmove(pBuf, VENDOR_STRING, (int)setup.nbytesVendor); + memmove(pBuf, VendorString, (int)setup.nbytesVendor); sizesofar += setup.nbytesVendor; pBuf += setup.nbytesVendor; i = padlength[setup.nbytesVendor & 3]; |