aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2017-11-04 23:51:30 +0100
committerMihai Moldovan <ionic@ionic.de>2018-02-26 04:54:35 +0100
commit50a33794069fd22e615f6208cd4c82a64452b485 (patch)
treec272cfb28c3d5c1940332d118993514907993188 /nx-X11/programs
parentb40dec982d17b010cedc183ebdc4c75ca7de785f (diff)
downloadnx-libs-50a33794069fd22e615f6208cd4c82a64452b485.tar.gz
nx-libs-50a33794069fd22e615f6208cd4c82a64452b485.tar.bz2
nx-libs-50a33794069fd22e615f6208cd4c82a64452b485.zip
Lift dix to xorg-xserver-7.1/1.1.0 state
Diffstat (limited to 'nx-X11/programs')
-rw-r--r--nx-X11/programs/Xserver/dix/colormap.c7
-rw-r--r--nx-X11/programs/Xserver/dix/globals.c7
-rw-r--r--nx-X11/programs/Xserver/dix/main.c2
-rw-r--r--nx-X11/programs/Xserver/dix/pixmap.c8
-rw-r--r--nx-X11/programs/Xserver/dix/window.c31
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/NXwindow.c4
-rw-r--r--nx-X11/programs/Xserver/include/colormapst.h19
-rw-r--r--nx-X11/programs/Xserver/include/pixmapstr.h13
-rw-r--r--nx-X11/programs/Xserver/include/window.h7
9 files changed, 84 insertions, 14 deletions
diff --git a/nx-X11/programs/Xserver/dix/colormap.c b/nx-X11/programs/Xserver/dix/colormap.c
index 81b93d2de..42ba8002a 100644
--- a/nx-X11/programs/Xserver/dix/colormap.c
+++ b/nx-X11/programs/Xserver/dix/colormap.c
@@ -273,6 +273,13 @@ CreateColormap (Colormap mid, ScreenPtr pScreen, VisualPtr pVisual,
pmap = (ColormapPtr) malloc(sizebytes);
if (!pmap)
return (BadAlloc);
+#if defined(_XSERVER64)
+ pmap->pad0 = 0;
+ pmap->pad1 = 0;
+#if (X_BYTE_ORDER == X_LITTLE_ENDIAN)
+ pmap->pad2 = 0;
+#endif
+#endif
pmap->red = (EntryPtr)((char *)pmap + sizeof(ColormapRec));
sizebytes = size * sizeof(Entry);
pmap->clientPixelsRed = (Pixel **)((char *)pmap->red + sizebytes);
diff --git a/nx-X11/programs/Xserver/dix/globals.c b/nx-X11/programs/Xserver/dix/globals.c
index 6f4774a5c..04e6585dd 100644
--- a/nx-X11/programs/Xserver/dix/globals.c
+++ b/nx-X11/programs/Xserver/dix/globals.c
@@ -103,7 +103,7 @@ int ScreenSaverAllowExposures;
# define DEFAULT_OFF_TIME DEFAULT_SCREEN_SAVER_TIME * 4
# endif
# ifndef DEFAULT_DPMS_ENABLED
-# define DEFAULT_DPMS_ENABLED FALSE
+# define DEFAULT_DPMS_ENABLED TRUE
# endif
CARD32 defaultDPMSStandbyTime = DEFAULT_STANDBY_TIME;
CARD32 defaultDPMSSuspendTime = DEFAULT_SUSPEND_TIME;
@@ -140,15 +140,12 @@ FontPtr defaultFont; /* not declared in dix.h to avoid including font.h in
Bool loadableFonts = FALSE;
CursorPtr rootCursor;
Bool blackRoot=FALSE;
+Bool whiteRoot=FALSE;
ClientPtr requestingClient; /* XXX this should be obsolete now, remove? */
TimeStamp currentTime;
TimeStamp lastDeviceEventTime;
-Bool permitOldBugs = FALSE; /* turn off some error checking, to permit certain
- * old broken clients (like R2/R3 xterms) to work
- */
-
int defaultColorVisualClass = -1;
int monitorResolution = 0;
diff --git a/nx-X11/programs/Xserver/dix/main.c b/nx-X11/programs/Xserver/dix/main.c
index eb8f359a6..d5503676d 100644
--- a/nx-X11/programs/Xserver/dix/main.c
+++ b/nx-X11/programs/Xserver/dix/main.c
@@ -167,7 +167,7 @@ ReplyNotSwappd(
int
main(int argc, char *argv[], char *envp[])
{
- int i, error;
+ int i;
char *xauthfile;
HWEventQueueType alwaysCheckForInput[2];
diff --git a/nx-X11/programs/Xserver/dix/pixmap.c b/nx-X11/programs/Xserver/dix/pixmap.c
index 709f413ed..f13473498 100644
--- a/nx-X11/programs/Xserver/dix/pixmap.c
+++ b/nx-X11/programs/Xserver/dix/pixmap.c
@@ -146,5 +146,13 @@ AllocatePixmap(ScreenPtr pScreen, int pixDataSize)
#else
pPixmap = (PixmapPtr)calloc(1, sizeof(PixmapRec) + pixDataSize);
#endif
+
+#ifdef _XSERVER64
+ if (pPixmap) {
+ pPixmap->drawable.pad0 = 0;
+ pPixmap->drawable.pad1 = 0;
+ }
+#endif
+
return pPixmap;
}
diff --git a/nx-X11/programs/Xserver/dix/window.c b/nx-X11/programs/Xserver/dix/window.c
index ba9cfc2d2..7cb5a5f4b 100644
--- a/nx-X11/programs/Xserver/dix/window.c
+++ b/nx-X11/programs/Xserver/dix/window.c
@@ -358,6 +358,10 @@ AllocateWindow(ScreenPtr pScreen)
else
ppriv->ptr = (void *)NULL;
}
+#if _XSERVER64
+ pWin->drawable.pad0 = 0;
+ pWin->drawable.pad1 = 0;
+#endif
}
return pWin;
}
@@ -2709,7 +2713,7 @@ MapWindow(register WindowPtr pWin, ClientPtr client)
}
pWin->mapped = TRUE;
- if (SubStrSend(pWin, pParent))
+ if (SubStrSend(pWin, pParent) && MapUnmapEventsEnabled(pWin))
{
memset(&event, 0, sizeof(xEvent));
event.u.u.type = MapNotify;
@@ -2968,7 +2972,7 @@ UnmapWindow(register WindowPtr pWin, Bool fromConfigure)
if ((!pWin->mapped) || (!(pParent = pWin->parent)))
return(Success);
- if (SubStrSend(pWin, pParent))
+ if (SubStrSend(pWin, pParent) && MapUnmapEventsEnabled(pWin))
{
memset(&event, 0, sizeof(xEvent));
event.u.u.type = UnmapNotify;
@@ -3271,6 +3275,29 @@ SendVisibilityNotify(WindowPtr pWin)
DeliverEvents(pWin, &event, 1, NullWindow);
}
+static WindowPtr windowDisableMapUnmapEvents;
+
+void
+DisableMapUnmapEvents(WindowPtr pWin)
+{
+ assert (windowDisableMapUnmapEvents == NULL);
+
+ windowDisableMapUnmapEvents = pWin;
+}
+
+void
+EnableMapUnmapEvents(WindowPtr pWin)
+{
+ assert (windowDisableMapUnmapEvents != NULL);
+
+ windowDisableMapUnmapEvents = NULL;
+}
+
+Bool
+MapUnmapEventsEnabled(WindowPtr pWin)
+{
+ return pWin != windowDisableMapUnmapEvents;
+}
#define RANDOM_WIDTH 32
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c b/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c
index 5df252d34..327b6ff68 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/NXwindow.c
@@ -874,7 +874,7 @@ MapWindow(register WindowPtr pWin, ClientPtr client)
}
pWin->mapped = TRUE;
- if (SubStrSend(pWin, pParent))
+ if (SubStrSend(pWin, pParent) && MapUnmapEventsEnabled(pWin))
{
memset(&event, 0, sizeof(xEvent));
event.u.u.type = MapNotify;
@@ -960,7 +960,7 @@ UnmapWindow(register WindowPtr pWin, Bool fromConfigure)
if ((!pWin->mapped) || (!(pParent = pWin->parent)))
return(Success);
- if (SubStrSend(pWin, pParent))
+ if (SubStrSend(pWin, pParent) && MapUnmapEventsEnabled(pWin))
{
xEvent event = {0};
event.u.u.type = UnmapNotify;
diff --git a/nx-X11/programs/Xserver/include/colormapst.h b/nx-X11/programs/Xserver/include/colormapst.h
index a8fa055de..d26987581 100644
--- a/nx-X11/programs/Xserver/include/colormapst.h
+++ b/nx-X11/programs/Xserver/include/colormapst.h
@@ -48,6 +48,8 @@ SOFTWARE.
#ifndef CMAPSTRUCT_H
#define CMAPSTRUCT_H 1
+#include <nx-X11/Xarch.h>
+
#include "colormap.h"
#include "screenint.h"
@@ -88,15 +90,26 @@ typedef struct _CMEntry
Bool fShared;
} Entry;
-/* COLORMAPs can be used for either Direct or Pseudo color. PseudoColor
+/*
+ * COLORMAPs can be used for either Direct or Pseudo color. PseudoColor
* only needs one cell table, we arbitrarily pick red. We keep track
- * of that table with freeRed, numPixelsRed, and clientPixelsRed */
+ * of that table with freeRed, numPixelsRed, and clientPixelsRed
+ *
+ * The padN variables are unfortunate ABI BC. See fdo bug #6924.
+ */
typedef struct _ColormapRec
{
VisualPtr pVisual;
short class; /* PseudoColor or DirectColor */
- long mid; /* client's name for colormap */
+#if defined(_XSERVER64)
+ short pad0;
+ XID pad1;
+#endif
+ XID mid; /* client's name for colormap */
+#if defined(_XSERVER64) && (X_BYTE_ORDER == X_LITTLE_ENDIAN)
+ XID pad2;
+#endif
ScreenPtr pScreen; /* screen map is associated with */
short flags; /* 1 = IsDefault
* 2 = AllAllocated */
diff --git a/nx-X11/programs/Xserver/include/pixmapstr.h b/nx-X11/programs/Xserver/include/pixmapstr.h
index 5d38c1c3b..d7f934a34 100644
--- a/nx-X11/programs/Xserver/include/pixmapstr.h
+++ b/nx-X11/programs/Xserver/include/pixmapstr.h
@@ -47,16 +47,27 @@ SOFTWARE.
#ifndef PIXMAPSTRUCT_H
#define PIXMAPSTRUCT_H
+#include <nx-X11/Xarch.h>
#include "pixmap.h"
#include "screenint.h"
#include "regionstr.h"
+/*
+ * The padN members are unfortunate ABI BC. See fdo bug #6924.
+ */
+
typedef struct _Drawable {
unsigned char type; /* DRAWABLE_<type> */
unsigned char class; /* specific to type */
unsigned char depth;
unsigned char bitsPerPixel;
- unsigned long id; /* resource id */
+#if defined(_XSERVER64)
+ XID pad0;
+#endif
+ XID id; /* resource id */
+#if defined(_XSERVER64)
+ XID pad1;
+#endif
short x; /* window: screen absolute, pixmap: 0 */
short y; /* window: screen absolute, pixmap: 0 */
unsigned short width;
diff --git a/nx-X11/programs/Xserver/include/window.h b/nx-X11/programs/Xserver/include/window.h
index a8c78f569..6e93e8ff8 100644
--- a/nx-X11/programs/Xserver/include/window.h
+++ b/nx-X11/programs/Xserver/include/window.h
@@ -264,4 +264,11 @@ extern RegionPtr CreateBoundingShape(
extern RegionPtr CreateClipShape(
WindowPtr /* pWin */ );
+extern void DisableMapUnmapEvents(
+ WindowPtr /* pWin */ );
+extern void EnableMapUnmapEvents(
+ WindowPtr /* pWin */ );
+extern Bool MapUnmapEventsEnabled(
+ WindowPtr /* pWin */ );
+
#endif /* WINDOW_H */