Commit 50a33794 authored by Ulrich Sibiller's avatar Ulrich Sibiller Committed by Mihai Moldovan

Lift dix to xorg-xserver-7.1/1.1.0 state

parent b40dec98
......@@ -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);
......
......@@ -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;
......
......@@ -167,7 +167,7 @@ ReplyNotSwappd(
int
main(int argc, char *argv[], char *envp[])
{
int i, error;
int i;
char *xauthfile;
HWEventQueueType alwaysCheckForInput[2];
......
......@@ -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;
}
......@@ -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
......
......@@ -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;
......
......@@ -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 */
......
......@@ -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;
......
......@@ -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 */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment