summaryrefslogtreecommitdiff
path: root/hw/xnest
diff options
context:
space:
mode:
Diffstat (limited to 'hw/xnest')
-rw-r--r--hw/xnest/Color.c2
-rw-r--r--hw/xnest/Cursor.c4
-rw-r--r--hw/xnest/Display.c9
-rw-r--r--hw/xnest/Display.h3
-rw-r--r--hw/xnest/Drawable.h3
-rw-r--r--hw/xnest/Events.c5
-rw-r--r--hw/xnest/Font.c2
-rw-r--r--hw/xnest/GC.c12
-rw-r--r--hw/xnest/GCOps.c2
-rw-r--r--hw/xnest/Handlers.c3
-rw-r--r--hw/xnest/Init.c40
-rw-r--r--hw/xnest/Keyboard.c135
-rw-r--r--hw/xnest/Pixmap.c16
-rw-r--r--hw/xnest/Screen.c56
-rw-r--r--hw/xnest/TestExt.c9
-rw-r--r--hw/xnest/Window.c14
-rw-r--r--hw/xnest/Xnest.h5
-rw-r--r--hw/xnest/Xnest.man.pre5
18 files changed, 285 insertions, 40 deletions
diff --git a/hw/xnest/Color.c b/hw/xnest/Color.c
index 76e71aeee..61b560800 100644
--- a/hw/xnest/Color.c
+++ b/hw/xnest/Color.c
@@ -30,8 +30,6 @@ is" without express or implied warranty.
#include "XNWindow.h"
#include "Args.h"
-#define lowbit(x) ((x) & (~(x) + 1))
-
static ColormapPtr InstalledMaps[MAXSCREENS];
Bool xnestCreateColormap(pCmap)
diff --git a/hw/xnest/Cursor.c b/hw/xnest/Cursor.c
index 6915df7a2..c20ec940a 100644
--- a/hw/xnest/Cursor.c
+++ b/hw/xnest/Cursor.c
@@ -12,6 +12,8 @@ the suitability of this software for any purpose. It is provided "as
is" without express or implied warranty.
*/
+/* $XFree86: xc/programs/Xserver/hw/xnest/Cursor.c,v 1.3 2002/11/23 19:27:50 tsi Exp $ */
+
#include "X.h"
#include "Xproto.h"
#include "screenint.h"
@@ -26,7 +28,7 @@ is" without express or implied warranty.
#include "Display.h"
#include "Screen.h"
-#include "Cursor.h"
+#include "XNCursor.h"
#include "Visual.h"
#include "Keyboard.h"
#include "Args.h"
diff --git a/hw/xnest/Display.c b/hw/xnest/Display.c
index 5f3bdb9a5..d8cefcc6f 100644
--- a/hw/xnest/Display.c
+++ b/hw/xnest/Display.c
@@ -12,10 +12,11 @@ the suitability of this software for any purpose. It is provided "as
is" without express or implied warranty.
*/
+/* $XFree86: xc/programs/Xserver/hw/xnest/Display.c,v 3.4 2001/10/28 03:34:10 tsi Exp $ */
-#include "X.h"
-#include "Xproto.h"
+#include <X11/X.h>
+#include <X11/Xproto.h>
#include "screenint.h"
#include "input.h"
#include "misc.h"
@@ -89,7 +90,7 @@ void xnestOpenDisplay(argc, argv)
break;
}
if (xnestDefaultVisualIndex == UNDEFINED)
- FatalError("Uable to find desird default visual.\n");
+ FatalError("Unable to find desired default visual.\n");
}
else {
vi.visualid = XVisualIDFromVisual(DefaultVisual(xnestDisplay,
@@ -184,8 +185,6 @@ void xnestOpenDisplay(argc, argv)
void xnestCloseDisplay()
{
- int i;
-
if (!xnestDoFullGeneration || !xnestDisplay) return;
/*
diff --git a/hw/xnest/Display.h b/hw/xnest/Display.h
index 3699d18d5..14ed0bb0a 100644
--- a/hw/xnest/Display.h
+++ b/hw/xnest/Display.h
@@ -12,6 +12,7 @@ the suitability of this software for any purpose. It is provided "as
is" without express or implied warranty.
*/
+/* $XFree86: xc/programs/Xserver/hw/xnest/Display.h,v 1.6 2001/01/17 22:36:55 dawes Exp $ */
#ifndef XNESTCOMMON_H
#define XNESTCOMMON_H
@@ -19,7 +20,7 @@ is" without express or implied warranty.
#define UNDEFINED -1
#define MAXDEPTH 32
-#define MAXVISUALSPERDEPTH 6
+#define MAXVISUALSPERDEPTH 256
extern Display *xnestDisplay;
extern XVisualInfo *xnestVisuals;
diff --git a/hw/xnest/Drawable.h b/hw/xnest/Drawable.h
index 47b723731..6f52b286b 100644
--- a/hw/xnest/Drawable.h
+++ b/hw/xnest/Drawable.h
@@ -12,12 +12,13 @@ the suitability of this software for any purpose. It is provided "as
is" without express or implied warranty.
*/
+/* $XFree86: xc/programs/Xserver/hw/xnest/Drawable.h,v 1.3 2002/11/23 19:27:50 tsi Exp $ */
#ifndef XNESTDRAWABLE_H
#define XNESTDRAWABLE_H
#include "XNWindow.h"
-#include "Pixmap.h"
+#include "XNPixmap.h"
#define xnestDrawable(pDrawable) \
((pDrawable)->type == DRAWABLE_WINDOW ? \
diff --git a/hw/xnest/Events.c b/hw/xnest/Events.c
index 760f1962a..729296f22 100644
--- a/hw/xnest/Events.c
+++ b/hw/xnest/Events.c
@@ -12,6 +12,8 @@ the suitability of this software for any purpose. It is provided "as
is" without express or implied warranty.
*/
+/* $XFree86: xc/programs/Xserver/hw/xnest/Events.c,v 1.2 2001/08/01 00:44:57 tsi Exp $ */
+
#include "X.h"
#define NEED_EVENTS
#include "Xproto.h"
@@ -22,8 +24,11 @@ is" without express or implied warranty.
#include "windowstr.h"
#include "servermd.h"
+#include "mi.h"
+
#include "Xnest.h"
+#include "Color.h"
#include "Display.h"
#include "Screen.h"
#include "XNWindow.h"
diff --git a/hw/xnest/Font.c b/hw/xnest/Font.c
index 562db362d..b30cf45bf 100644
--- a/hw/xnest/Font.c
+++ b/hw/xnest/Font.c
@@ -12,6 +12,8 @@ the suitability of this software for any purpose. It is provided "as
is" without express or implied warranty.
*/
+/* $XFree86: xc/programs/Xserver/hw/xnest/Font.c,v 3.5 2001/01/17 22:36:55 dawes Exp $ */
+
#include "X.h"
#include "Xatom.h"
#include "Xproto.h"
diff --git a/hw/xnest/GC.c b/hw/xnest/GC.c
index 3e16c95c2..0816957de 100644
--- a/hw/xnest/GC.c
+++ b/hw/xnest/GC.c
@@ -12,6 +12,8 @@ the suitability of this software for any purpose. It is provided "as
is" without express or implied warranty.
*/
+/* $XFree86: xc/programs/Xserver/hw/xnest/GC.c,v 3.6 2001/10/28 03:34:11 tsi Exp $ */
+
#include "X.h"
#include "Xproto.h"
#include "gcstruct.h"
@@ -130,11 +132,12 @@ void xnestChangeGC(pGC, mask)
if (mask & GCFillRule)
values.fill_rule = pGC->fillRule;
- if (mask & GCTile)
+ if (mask & GCTile) {
if (pGC->tileIsPixel)
mask &= ~GCTile;
else
values.tile = xnestPixmap(pGC->tile.pixmap);
+ }
if (mask & GCStipple)
values.stipple = xnestPixmap(pGC->stipple);
@@ -279,9 +282,8 @@ void xnestChangeClip(pGC, type, pValue, nRects)
* other parts of server can only deal with CT_NONE,
* CT_PIXMAP and CT_REGION client clips.
*/
- pGC->clientClip = (pointer) (*pGC->pScreen->RectsToRegion)(nRects,
- (xRectangle *)pValue,
- type);
+ pGC->clientClip = (pointer) RECTS_TO_REGION(pGC->pScreen, nRects,
+ (xRectangle *)pValue, type);
xfree(pValue);
pValue = pGC->clientClip;
type = CT_REGION;
@@ -326,8 +328,6 @@ void xnestCopyClip(pGCDst, pGCSrc)
GCPtr pGCDst;
{
RegionPtr pRgn;
- int nRects, size;
- xRectangle *pRects;
switch (pGCSrc->clientClipType)
{
diff --git a/hw/xnest/GCOps.c b/hw/xnest/GCOps.c
index 745fd602f..3af24c35a 100644
--- a/hw/xnest/GCOps.c
+++ b/hw/xnest/GCOps.c
@@ -12,6 +12,8 @@ the suitability of this software for any purpose. It is provided "as
is" without express or implied warranty.
*/
+/* $XFree86: xc/programs/Xserver/hw/xnest/GCOps.c,v 3.4 2001/01/17 22:36:55 dawes Exp $ */
+
#include "X.h"
#include "Xproto.h"
#include "miscstruct.h"
diff --git a/hw/xnest/Handlers.c b/hw/xnest/Handlers.c
index 6feddebd7..d65116b0d 100644
--- a/hw/xnest/Handlers.c
+++ b/hw/xnest/Handlers.c
@@ -12,6 +12,8 @@ the suitability of this software for any purpose. It is provided "as
is" without express or implied warranty.
*/
+/* $XFree86: xc/programs/Xserver/hw/xnest/Handlers.c,v 1.2 2001/08/01 00:44:57 tsi Exp $ */
+
#include "X.h"
#include "Xproto.h"
#include "screenint.h"
@@ -24,6 +26,7 @@ is" without express or implied warranty.
#include "Xnest.h"
#include "Display.h"
+#include "Events.h"
#include "Handlers.h"
void xnestBlockHandler(blockData, pTimeout, pReadMask)
diff --git a/hw/xnest/Init.c b/hw/xnest/Init.c
index 00cd4f9ac..665aec182 100644
--- a/hw/xnest/Init.c
+++ b/hw/xnest/Init.c
@@ -12,6 +12,8 @@ the suitability of this software for any purpose. It is provided "as
is" without express or implied warranty.
*/
+/* $XFree86: xc/programs/Xserver/hw/xnest/Init.c,v 3.24 2003/01/15 02:34:14 torrey Exp $ */
+
#include "X.h"
#include "Xproto.h"
#include "screenint.h"
@@ -20,6 +22,8 @@ is" without express or implied warranty.
#include "scrnintstr.h"
#include "windowstr.h"
#include "servermd.h"
+#include "mi.h"
+#include "fontstruct.h"
#include "Xnest.h"
@@ -53,7 +57,8 @@ void InitOutput(screenInfo, argc, argv)
screenInfo->numPixmapFormats = 0;
for (i = 0; i < xnestNumPixmapFormats; i++)
for (j = 0; j < xnestNumDepths; j++)
- if (xnestPixmapFormats[i].depth == xnestDepths[j]) {
+ if ((xnestPixmapFormats[i].depth == 1) ||
+ (xnestPixmapFormats[i].depth == xnestDepths[j])) {
screenInfo->formats[screenInfo->numPixmapFormats].depth =
xnestPixmapFormats[i].depth;
screenInfo->formats[screenInfo->numPixmapFormats].bitsPerPixel =
@@ -61,6 +66,7 @@ void InitOutput(screenInfo, argc, argv)
screenInfo->formats[screenInfo->numPixmapFormats].scanlinePad =
xnestPixmapFormats[i].scanline_pad;
screenInfo->numPixmapFormats++;
+ break;
}
xnestWindowPrivateIndex = AllocateWindowPrivateIndex();
@@ -81,8 +87,8 @@ void InitInput(argc, argv)
int argc;
char *argv[];
{
- DevicePtr ptr, kbd;
-
+ pointer ptr, kbd;
+
ptr = AddInputDevice(xnestPointerProc, TRUE);
kbd = AddInputDevice(xnestKeyboardProc, TRUE);
@@ -111,11 +117,39 @@ void ddxGiveUp()
AbortDDX();
}
+#ifdef __DARWIN__
+void
+DarwinHandleGUI(int argc, char *argv[])
+{
+}
+
+void GlxExtensionInit();
+void GlxWrapInitVisuals(void *procPtr);
+
+void
+DarwinGlxExtensionInit()
+{
+ GlxExtensionInit();
+}
+
+void
+DarwinGlxWrapInitVisuals(
+ void *procPtr)
+{
+ GlxWrapInitVisuals(procPtr);
+}
+#endif
+
void OsVendorInit()
{
return;
}
+void OsVendorFatalError()
+{
+ return;
+}
+
/* this is just to get the server to link on AIX */
#ifdef AIXV3
int SelectWaitTime = 10000; /* usec */
diff --git a/hw/xnest/Keyboard.c b/hw/xnest/Keyboard.c
index ce5d57f5d..107caee90 100644
--- a/hw/xnest/Keyboard.c
+++ b/hw/xnest/Keyboard.c
@@ -12,6 +12,8 @@ the suitability of this software for any purpose. It is provided "as
is" without express or implied warranty.
*/
+/* $XFree86: xc/programs/Xserver/hw/xnest/Keyboard.c,v 1.8 2001/10/28 03:34:11 tsi Exp $ */
+
#define NEED_EVENTS
#include "X.h"
#include "Xproto.h"
@@ -29,6 +31,63 @@ is" without express or implied warranty.
#include "Keyboard.h"
#include "Args.h"
+#ifdef XKB
+#include <X11/extensions/XKB.h>
+#include <X11/extensions/XKBsrv.h>
+#include <X11/extensions/XKBconfig.h>
+
+extern Bool XkbQueryExtension(
+#if NeedFunctionPrototypes
+ Display * /* dpy */,
+ int * /* opcodeReturn */,
+ int * /* eventBaseReturn */,
+ int * /* errorBaseReturn */,
+ int * /* majorRtrn */,
+ int * /* minorRtrn */
+#endif
+);
+
+extern XkbDescPtr XkbGetKeyboard(
+#if NeedFunctionPrototypes
+ Display * /* dpy */,
+ unsigned int /* which */,
+ unsigned int /* deviceSpec */
+#endif
+);
+
+extern Status XkbGetControls(
+#if NeedFunctionPrototypes
+ Display * /* dpy */,
+ unsigned long /* which */,
+ XkbDescPtr /* desc */
+#endif
+);
+
+#ifndef XKB_BASE_DIRECTORY
+#define XKB_BASE_DIRECTORY "/usr/X11R6/lib/X11/xkb/"
+#endif
+#ifndef XKB_CONFIG_FILE
+#define XKB_CONFIG_FILE "X0-config.keyboard"
+#endif
+#ifndef XKB_DFLT_RULES_FILE
+#define XKB_DFLT_RULES_FILE "xfree86"
+#endif
+#ifndef XKB_DFLT_KB_LAYOUT
+#define XKB_DFLT_KB_LAYOUT "us"
+#endif
+#ifndef XKB_DFLT_KB_MODEL
+#define XKB_DFLT_KB_MODEL "pc101"
+#endif
+#ifndef XKB_DFLT_KB_VARIANT
+#define XKB_DFLT_KB_VARIANT NULL
+#endif
+#ifndef XKB_DFLT_KB_OPTIONS
+#define XKB_DFLT_KB_OPTIONS NULL
+#endif
+
+extern Bool noXkbExtension;
+#endif
+
void xnestBell(volume, pDev, ctrl, cls)
int volume;
DeviceIntPtr pDev;
@@ -42,6 +101,7 @@ void xnestChangeKeyboardControl(pDev, ctrl)
DeviceIntPtr pDev;
KeybdCtrl *ctrl;
{
+#if 0
unsigned long value_mask;
XKeyboardControl values;
int i;
@@ -73,6 +133,7 @@ void xnestChangeKeyboardControl(pDev, ctrl)
values.led_mode = (ctrl->leds & (1 << (i - 1))) ? LedModeOn : LedModeOff;
XChangeKeyboardControl(xnestDisplay, value_mask, &values);
}
+#endif
}
int xnestKeyboardProc(pDev, onoff, argc, argv)
@@ -120,9 +181,9 @@ int xnestKeyboardProc(pDev, onoff, argc, argv)
for (j = 0; j < 8; j++)
for(i = 0; i < modifier_keymap->max_keypermod; i++) {
CARD8 keycode;
- if (keycode =
+ if ((keycode =
modifier_keymap->
- modifiermap[j * modifier_keymap->max_keypermod + i])
+ modifiermap[j * modifier_keymap->max_keypermod + i]))
modmap[keycode] |= 1<<j;
}
XFreeModifiermap(modifier_keymap);
@@ -132,6 +193,10 @@ int xnestKeyboardProc(pDev, onoff, argc, argv)
keySyms.mapWidth = mapWidth;
keySyms.map = keymap;
+#ifdef XKB
+ if (noXkbExtension) {
+XkbError:
+#endif
XGetKeyboardControl(xnestDisplay, &values);
memmove((char *) defaultKeyboardControl.autoRepeats,
@@ -139,7 +204,73 @@ int xnestKeyboardProc(pDev, onoff, argc, argv)
InitKeyboardDeviceStruct(pDev, &keySyms, modmap,
xnestBell, xnestChangeKeyboardControl);
+#ifdef XKB
+ } else {
+ FILE *file;
+ XkbConfigRtrnRec config;
+
+ XkbComponentNamesRec names;
+ char *rules, *model, *layout, *variants, *options;
+
+ XkbDescPtr xkb;
+ int op, event, error, major, minor;
+
+ if (XkbQueryExtension(xnestDisplay, &op, &event, &error, &major, &minor) == 0) {
+ ErrorF("Unable to initialize XKEYBOARD extension.\n");
+ goto XkbError;
+ }
+ xkb = XkbGetKeyboard(xnestDisplay, XkbGBN_AllComponentsMask, XkbUseCoreKbd);
+ if (xkb == NULL || xkb->geom == NULL) {
+ ErrorF("Couldn't get keyboard.\n");
+ goto XkbError;
+ }
+ XkbGetControls(xnestDisplay, XkbAllControlsMask, xkb);
+
+ memset(&names, 0, sizeof(XkbComponentNamesRec));
+ rules = XKB_DFLT_RULES_FILE;
+ model = XKB_DFLT_KB_MODEL;
+ layout = XKB_DFLT_KB_LAYOUT;
+ variants = XKB_DFLT_KB_VARIANT;
+ options = XKB_DFLT_KB_OPTIONS;
+ if (XkbInitialMap) {
+ if ((names.keymap = strchr(XkbInitialMap, '/')) != NULL)
+ ++names.keymap;
+ else
+ names.keymap = XkbInitialMap;
+ }
+
+ if ((file = fopen(XKB_BASE_DIRECTORY XKB_CONFIG_FILE, "r")) != NULL) {
+ if (XkbCFParse(file, XkbCFDflts, xkb, &config) == 0) {
+ ErrorF("Error parsing config file.\n");
+ fclose(file);
+ goto XkbError;
+ }
+ if (config.rules_file)
+ rules = config.rules_file;
+ if (config.model)
+ model = config.model;
+ if (config.layout)
+ layout = config.layout;
+ if (config.variant)
+ variants = config.variant;
+ if (config.options)
+ options = config.options;
+
+ fclose(file);
+ }
+
+ XkbSetRulesDflts(rules, model, layout, variants, options);
+ XkbInitKeyboardDeviceStruct((pointer)pDev, &names, &keySyms, modmap,
+ xnestBell, xnestChangeKeyboardControl);
+ XkbDDXChangeControls((pointer)pDev, xkb->ctrls, xkb->ctrls);
+ XkbFreeKeyboard(xkb, 0, False);
+ }
+#endif
+#ifdef _XSERVER64
+ xfree(keymap);
+#else
XFree(keymap);
+#endif
break;
case DEVICE_ON:
xnestEventMask |= XNEST_KEYBOARD_EVENT_MASK;
diff --git a/hw/xnest/Pixmap.c b/hw/xnest/Pixmap.c
index 51180a4f5..f93dcac52 100644
--- a/hw/xnest/Pixmap.c
+++ b/hw/xnest/Pixmap.c
@@ -12,6 +12,8 @@ the suitability of this software for any purpose. It is provided "as
is" without express or implied warranty.
*/
+/* $XFree86: xc/programs/Xserver/hw/xnest/Pixmap.c,v 3.6 2003/01/10 13:29:40 eich Exp $ */
+
#include "X.h"
#include "Xproto.h"
#include "miscstruct.h"
@@ -26,7 +28,11 @@ is" without express or implied warranty.
#include "Display.h"
#include "Screen.h"
-#include "Pixmap.h"
+#include "XNPixmap.h"
+
+#ifdef PIXPRIV
+int xnestPixmapPrivateIndex;
+#endif
PixmapPtr xnestCreatePixmap(pScreen, width, height, depth)
ScreenPtr pScreen;
@@ -36,7 +42,7 @@ PixmapPtr xnestCreatePixmap(pScreen, width, height, depth)
{
PixmapPtr pPixmap;
- pPixmap = (PixmapPtr)xalloc(sizeof(PixmapRec) + sizeof(xnestPrivPixmap));
+ pPixmap = AllocatePixmap(pScreen, sizeof(xnestPrivPixmap));
if (!pPixmap)
return NullPixmap;
pPixmap->drawable.type = DRAWABLE_PIXMAP;
@@ -52,7 +58,12 @@ PixmapPtr xnestCreatePixmap(pScreen, width, height, depth)
pPixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER;
pPixmap->refcnt = 1;
pPixmap->devKind = PixmapBytePad(width, depth);
+#ifdef PIXPRIV
+ pPixmap->devPrivates[xnestPixmapPrivateIndex].ptr =
+ (pointer)((char *)pPixmap + pScreen->totalPixmapSize);
+#else
pPixmap->devPrivate.ptr = (pointer)(pPixmap + 1);
+#endif
if (width && height)
xnestPixmapPriv(pPixmap)->pixmap =
XCreatePixmap(xnestDisplay,
@@ -82,7 +93,6 @@ RegionPtr xnestPixmapToRegion(pPixmap)
register int x, y;
unsigned long previousPixel, currentPixel;
BoxRec Box;
- int nWidth;
Bool overlap;
ximage = XGetImage(xnestDisplay, xnestPixmap(pPixmap), 0, 0,
diff --git a/hw/xnest/Screen.c b/hw/xnest/Screen.c
index 4d718cb5d..bef6a75dd 100644
--- a/hw/xnest/Screen.c
+++ b/hw/xnest/Screen.c
@@ -12,6 +12,8 @@ the suitability of this software for any purpose. It is provided "as
is" without express or implied warranty.
*/
+/* $XFree86: xc/programs/Xserver/hw/xnest/Screen.c,v 3.11 2003/01/10 13:29:40 eich Exp $ */
+
#include "X.h"
#include "Xproto.h"
#include "scrnintstr.h"
@@ -25,27 +27,27 @@ is" without express or implied warranty.
#include "Display.h"
#include "Screen.h"
-#include "Args.h"
#include "XNGC.h"
#include "GCOps.h"
#include "Drawable.h"
#include "XNFont.h"
#include "Color.h"
-#include "Cursor.h"
+#include "XNCursor.h"
#include "Visual.h"
#include "Events.h"
#include "Init.h"
+#include "mipointer.h"
#include "Args.h"
-extern Bool miModifyPixmapHeader();
-extern Bool miCreateScreenResources();
-extern Bool miCloseScreen();
-extern Bool miScreenInit();
extern Window xnestParentWindow;
Window xnestDefaultWindows[MAXSCREENS];
Window xnestScreenSaverWindows[MAXSCREENS];
+#ifdef PIXPRIV
+int xnestScreenGeneration = -1;
+#endif
+
ScreenPtr xnestScreen(window)
Window window;
{
@@ -102,6 +104,28 @@ static Bool xnestSaveScreen(pScreen, what)
}
}
+static Bool
+xnestCursorOffScreen (ppScreen, x, y)
+ ScreenPtr *ppScreen;
+ int *x, *y;
+{
+ return FALSE;
+}
+
+static void
+xnestCrossScreen (pScreen, entering)
+ ScreenPtr pScreen;
+ Bool entering;
+{
+}
+
+static miPointerScreenFuncRec xnestPointerCursorFuncs =
+{
+ xnestCursorOffScreen,
+ xnestCrossScreen,
+ miPointerWarpCursor
+};
+
Bool xnestOpenScreen(index, pScreen, argc, argv)
int index;
register ScreenPtr pScreen;
@@ -123,6 +147,17 @@ Bool xnestOpenScreen(index, pScreen, argc, argv)
sizeof(xnestPrivGC))))
return False;
+#ifdef PIXPRIV
+ if (xnestScreenGeneration != serverGeneration) {
+ if ((xnestPixmapPrivateIndex = AllocatePixmapPrivateIndex()) < 0)
+ return False;
+ xnestScreenGeneration = serverGeneration;
+ }
+
+ if (!AllocatePixmapPrivate(pScreen,xnestPixmapPrivateIndex,
+ sizeof (xnestPrivPixmap)))
+ return False;
+#endif
visuals = (VisualPtr)xalloc(xnestNumVisuals * sizeof(VisualRec));
numVisuals = 0;
@@ -160,6 +195,9 @@ Bool xnestOpenScreen(index, pScreen, argc, argv)
(VisualID *)xalloc(MAXVISUALSPERDEPTH * sizeof(VisualID));
numDepths++;
}
+ if (depths[depthIndex].numVids >= MAXVISUALSPERDEPTH) {
+ FatalError("Visual table overflow");
+ }
depths[depthIndex].vids[depths[depthIndex].numVids] =
visuals[numVisuals].vid;
depths[depthIndex].numVids++;
@@ -179,7 +217,11 @@ Bool xnestOpenScreen(index, pScreen, argc, argv)
visuals[xnestDefaultVisualIndex].nplanes, /* rootDepth */
numDepths, depths,
visuals[xnestDefaultVisualIndex].vid, /* root visual */
- numVisuals, visuals, NULL);
+ numVisuals, visuals);
+
+ miInitializeBackingStore(pScreen);
+
+ miDCInitialize(pScreen, &xnestPointerCursorFuncs);
pScreen->mmWidth = xnestWidth * DisplayWidthMM(xnestDisplay,
DefaultScreen(xnestDisplay)) /
diff --git a/hw/xnest/TestExt.c b/hw/xnest/TestExt.c
index 7898bcd14..7f5a5907d 100644
--- a/hw/xnest/TestExt.c
+++ b/hw/xnest/TestExt.c
@@ -12,13 +12,18 @@ the suitability of this software for any purpose. It is provided "as
is" without express or implied warranty.
*/
-#include "X.h"
-#include "Xproto.h"
+/* $XFree86: xc/programs/Xserver/hw/xnest/TestExt.c,v 3.5 2001/08/27 17:41:00 dawes Exp $ */
+
+#include <X11/X.h>
+#include <X11/Xproto.h>
+#include <X11/Xlib.h>
+#undef Bool
#include "screenint.h"
#include "input.h"
#include "misc.h"
#include "scrnintstr.h"
#include "servermd.h"
+#include "mipointer.h"
#define XTestSERVER_SIDE
#include "xtestext1.h"
diff --git a/hw/xnest/Window.c b/hw/xnest/Window.c
index e345b49d1..a5dfc2de1 100644
--- a/hw/xnest/Window.c
+++ b/hw/xnest/Window.c
@@ -12,6 +12,8 @@ the suitability of this software for any purpose. It is provided "as
is" without express or implied warranty.
*/
+/* $XFree86: xc/programs/Xserver/hw/xnest/Window.c,v 3.7 2001/10/28 03:34:11 tsi Exp $ */
+
#include "X.h"
#include "Xproto.h"
#include "gcstruct.h"
@@ -22,6 +24,8 @@ is" without express or implied warranty.
#include "scrnintstr.h"
#include "region.h"
+#include "mi.h"
+
#include "Xnest.h"
#include "Display.h"
@@ -288,23 +292,26 @@ Bool xnestChangeWindowAttributes(pWin, mask)
break;
}
- if (mask & CWBackPixel)
+ if (mask & CWBackPixel) {
if (pWin->backgroundState == BackgroundPixel)
attributes.background_pixel = xnestPixel(pWin->background.pixel);
else
mask &= ~CWBackPixel;
+ }
- if (mask & CWBorderPixmap)
+ if (mask & CWBorderPixmap) {
if (pWin->borderIsPixel)
mask &= ~CWBorderPixmap;
else
attributes.border_pixmap = xnestPixmap(pWin->border.pixmap);
+ }
- if (mask & CWBorderPixel)
+ if (mask & CWBorderPixel) {
if (pWin->borderIsPixel)
attributes.border_pixel = xnestPixel(pWin->border.pixel);
else
mask &= ~CWBorderPixel;
+ }
if (mask & CWBitGravity)
attributes.bit_gravity = pWin->bitGravity;
@@ -488,7 +495,6 @@ void xnestShapeWindow(pWin)
BoxPtr pBox;
XRectangle rect;
int i;
- Bool overlap;
if (!xnestRegionEqual(xnestWindowPriv(pWin)->bounding_shape,
wBoundingShape(pWin))) {
diff --git a/hw/xnest/Xnest.h b/hw/xnest/Xnest.h
index 5ced40e28..64b09de7e 100644
--- a/hw/xnest/Xnest.h
+++ b/hw/xnest/Xnest.h
@@ -28,6 +28,7 @@ other dealings in this Software without prior written authorization
from the X Consortium.
*/
+/* $XFree86: xc/programs/Xserver/hw/xnest/Xnest.h,v 1.3 2001/08/28 16:48:08 tsi Exp $ */
/*
** Machines with a 64 bit library interface and a 32 bit server require
@@ -65,8 +66,8 @@ typedef XID KeySym64;
#endif /*_XSERVER64*/
#define GC XlibGC
-#include "Xlib.h"
-#include "Xutil.h"
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
#include <X11/extensions/shape.h>
#undef GC
diff --git a/hw/xnest/Xnest.man.pre b/hw/xnest/Xnest.man.pre
index 608c30dd1..474569a47 100644
--- a/hw/xnest/Xnest.man.pre
+++ b/hw/xnest/Xnest.man.pre
@@ -24,7 +24,10 @@
.\" not be used in advertising or otherwise to promote the sale, use or
.\" other dealings in this Software without prior written authorization
.\" from the X Consortium.
-.TH XNEST 1 "Release 6.4" "X Version 11"
+.\"
+.\" $XFree86: xc/programs/Xserver/hw/xnest/Xnest.man,v 1.6 2001/01/27 18:21:00 dawes Exp $
+.\"
+.TH XNEST 1 __xorgversion__
.SH NAME
Xnest \- a nested X server
.SH SYNOPSIS