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, ...@@ -273,6 +273,13 @@ CreateColormap (Colormap mid, ScreenPtr pScreen, VisualPtr pVisual,
pmap = (ColormapPtr) malloc(sizebytes); pmap = (ColormapPtr) malloc(sizebytes);
if (!pmap) if (!pmap)
return (BadAlloc); 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)); pmap->red = (EntryPtr)((char *)pmap + sizeof(ColormapRec));
sizebytes = size * sizeof(Entry); sizebytes = size * sizeof(Entry);
pmap->clientPixelsRed = (Pixel **)((char *)pmap->red + sizebytes); pmap->clientPixelsRed = (Pixel **)((char *)pmap->red + sizebytes);
......
...@@ -103,7 +103,7 @@ int ScreenSaverAllowExposures; ...@@ -103,7 +103,7 @@ int ScreenSaverAllowExposures;
# define DEFAULT_OFF_TIME DEFAULT_SCREEN_SAVER_TIME * 4 # define DEFAULT_OFF_TIME DEFAULT_SCREEN_SAVER_TIME * 4
# endif # endif
# ifndef DEFAULT_DPMS_ENABLED # ifndef DEFAULT_DPMS_ENABLED
# define DEFAULT_DPMS_ENABLED FALSE # define DEFAULT_DPMS_ENABLED TRUE
# endif # endif
CARD32 defaultDPMSStandbyTime = DEFAULT_STANDBY_TIME; CARD32 defaultDPMSStandbyTime = DEFAULT_STANDBY_TIME;
CARD32 defaultDPMSSuspendTime = DEFAULT_SUSPEND_TIME; CARD32 defaultDPMSSuspendTime = DEFAULT_SUSPEND_TIME;
...@@ -140,15 +140,12 @@ FontPtr defaultFont; /* not declared in dix.h to avoid including font.h in ...@@ -140,15 +140,12 @@ FontPtr defaultFont; /* not declared in dix.h to avoid including font.h in
Bool loadableFonts = FALSE; Bool loadableFonts = FALSE;
CursorPtr rootCursor; CursorPtr rootCursor;
Bool blackRoot=FALSE; Bool blackRoot=FALSE;
Bool whiteRoot=FALSE;
ClientPtr requestingClient; /* XXX this should be obsolete now, remove? */ ClientPtr requestingClient; /* XXX this should be obsolete now, remove? */
TimeStamp currentTime; TimeStamp currentTime;
TimeStamp lastDeviceEventTime; 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 defaultColorVisualClass = -1;
int monitorResolution = 0; int monitorResolution = 0;
......
...@@ -167,7 +167,7 @@ ReplyNotSwappd( ...@@ -167,7 +167,7 @@ ReplyNotSwappd(
int int
main(int argc, char *argv[], char *envp[]) main(int argc, char *argv[], char *envp[])
{ {
int i, error; int i;
char *xauthfile; char *xauthfile;
HWEventQueueType alwaysCheckForInput[2]; HWEventQueueType alwaysCheckForInput[2];
......
...@@ -146,5 +146,13 @@ AllocatePixmap(ScreenPtr pScreen, int pixDataSize) ...@@ -146,5 +146,13 @@ AllocatePixmap(ScreenPtr pScreen, int pixDataSize)
#else #else
pPixmap = (PixmapPtr)calloc(1, sizeof(PixmapRec) + pixDataSize); pPixmap = (PixmapPtr)calloc(1, sizeof(PixmapRec) + pixDataSize);
#endif #endif
#ifdef _XSERVER64
if (pPixmap) {
pPixmap->drawable.pad0 = 0;
pPixmap->drawable.pad1 = 0;
}
#endif
return pPixmap; return pPixmap;
} }
...@@ -358,6 +358,10 @@ AllocateWindow(ScreenPtr pScreen) ...@@ -358,6 +358,10 @@ AllocateWindow(ScreenPtr pScreen)
else else
ppriv->ptr = (void *)NULL; ppriv->ptr = (void *)NULL;
} }
#if _XSERVER64
pWin->drawable.pad0 = 0;
pWin->drawable.pad1 = 0;
#endif
} }
return pWin; return pWin;
} }
...@@ -2709,7 +2713,7 @@ MapWindow(register WindowPtr pWin, ClientPtr client) ...@@ -2709,7 +2713,7 @@ MapWindow(register WindowPtr pWin, ClientPtr client)
} }
pWin->mapped = TRUE; pWin->mapped = TRUE;
if (SubStrSend(pWin, pParent)) if (SubStrSend(pWin, pParent) && MapUnmapEventsEnabled(pWin))
{ {
memset(&event, 0, sizeof(xEvent)); memset(&event, 0, sizeof(xEvent));
event.u.u.type = MapNotify; event.u.u.type = MapNotify;
...@@ -2968,7 +2972,7 @@ UnmapWindow(register WindowPtr pWin, Bool fromConfigure) ...@@ -2968,7 +2972,7 @@ UnmapWindow(register WindowPtr pWin, Bool fromConfigure)
if ((!pWin->mapped) || (!(pParent = pWin->parent))) if ((!pWin->mapped) || (!(pParent = pWin->parent)))
return(Success); return(Success);
if (SubStrSend(pWin, pParent)) if (SubStrSend(pWin, pParent) && MapUnmapEventsEnabled(pWin))
{ {
memset(&event, 0, sizeof(xEvent)); memset(&event, 0, sizeof(xEvent));
event.u.u.type = UnmapNotify; event.u.u.type = UnmapNotify;
...@@ -3271,6 +3275,29 @@ SendVisibilityNotify(WindowPtr pWin) ...@@ -3271,6 +3275,29 @@ SendVisibilityNotify(WindowPtr pWin)
DeliverEvents(pWin, &event, 1, NullWindow); 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 #define RANDOM_WIDTH 32
......
...@@ -874,7 +874,7 @@ MapWindow(register WindowPtr pWin, ClientPtr client) ...@@ -874,7 +874,7 @@ MapWindow(register WindowPtr pWin, ClientPtr client)
} }
pWin->mapped = TRUE; pWin->mapped = TRUE;
if (SubStrSend(pWin, pParent)) if (SubStrSend(pWin, pParent) && MapUnmapEventsEnabled(pWin))
{ {
memset(&event, 0, sizeof(xEvent)); memset(&event, 0, sizeof(xEvent));
event.u.u.type = MapNotify; event.u.u.type = MapNotify;
...@@ -960,7 +960,7 @@ UnmapWindow(register WindowPtr pWin, Bool fromConfigure) ...@@ -960,7 +960,7 @@ UnmapWindow(register WindowPtr pWin, Bool fromConfigure)
if ((!pWin->mapped) || (!(pParent = pWin->parent))) if ((!pWin->mapped) || (!(pParent = pWin->parent)))
return(Success); return(Success);
if (SubStrSend(pWin, pParent)) if (SubStrSend(pWin, pParent) && MapUnmapEventsEnabled(pWin))
{ {
xEvent event = {0}; xEvent event = {0};
event.u.u.type = UnmapNotify; event.u.u.type = UnmapNotify;
......
...@@ -48,6 +48,8 @@ SOFTWARE. ...@@ -48,6 +48,8 @@ SOFTWARE.
#ifndef CMAPSTRUCT_H #ifndef CMAPSTRUCT_H
#define CMAPSTRUCT_H 1 #define CMAPSTRUCT_H 1
#include <nx-X11/Xarch.h>
#include "colormap.h" #include "colormap.h"
#include "screenint.h" #include "screenint.h"
...@@ -88,15 +90,26 @@ typedef struct _CMEntry ...@@ -88,15 +90,26 @@ typedef struct _CMEntry
Bool fShared; Bool fShared;
} Entry; } 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 * 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 typedef struct _ColormapRec
{ {
VisualPtr pVisual; VisualPtr pVisual;
short class; /* PseudoColor or DirectColor */ 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 */ ScreenPtr pScreen; /* screen map is associated with */
short flags; /* 1 = IsDefault short flags; /* 1 = IsDefault
* 2 = AllAllocated */ * 2 = AllAllocated */
......
...@@ -47,16 +47,27 @@ SOFTWARE. ...@@ -47,16 +47,27 @@ SOFTWARE.
#ifndef PIXMAPSTRUCT_H #ifndef PIXMAPSTRUCT_H
#define PIXMAPSTRUCT_H #define PIXMAPSTRUCT_H
#include <nx-X11/Xarch.h>
#include "pixmap.h" #include "pixmap.h"
#include "screenint.h" #include "screenint.h"
#include "regionstr.h" #include "regionstr.h"
/*
* The padN members are unfortunate ABI BC. See fdo bug #6924.
*/
typedef struct _Drawable { typedef struct _Drawable {
unsigned char type; /* DRAWABLE_<type> */ unsigned char type; /* DRAWABLE_<type> */
unsigned char class; /* specific to type */ unsigned char class; /* specific to type */
unsigned char depth; unsigned char depth;
unsigned char bitsPerPixel; 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 x; /* window: screen absolute, pixmap: 0 */
short y; /* window: screen absolute, pixmap: 0 */ short y; /* window: screen absolute, pixmap: 0 */
unsigned short width; unsigned short width;
......
...@@ -264,4 +264,11 @@ extern RegionPtr CreateBoundingShape( ...@@ -264,4 +264,11 @@ extern RegionPtr CreateBoundingShape(
extern RegionPtr CreateClipShape( extern RegionPtr CreateClipShape(
WindowPtr /* pWin */ ); WindowPtr /* pWin */ );
extern void DisableMapUnmapEvents(
WindowPtr /* pWin */ );
extern void EnableMapUnmapEvents(
WindowPtr /* pWin */ );
extern Bool MapUnmapEventsEnabled(
WindowPtr /* pWin */ );
#endif /* WINDOW_H */ #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