Compare commits
1 Commits
master
...
submit/xne
Author | SHA1 | Date | |
---|---|---|---|
|
9808fab0a2 |
|
@ -217,22 +217,8 @@ xnestSetInstalledColormapWindows(ScreenPtr pScreen)
|
|||
if (!xnestSameInstalledColormapWindows(icws.windows, icws.numWindows)) {
|
||||
free(xnestOldInstalledColormapWindows);
|
||||
|
||||
#ifdef _XSERVER64
|
||||
{
|
||||
int i;
|
||||
Window64 *windows = xallocarray(numWindows, sizeof(Window64));
|
||||
|
||||
for (i = 0; i < numWindows; ++i)
|
||||
windows[i] = icws.windows[i];
|
||||
XSetWMColormapWindows(xnestDisplay,
|
||||
xnestDefaultWindows[pScreen->myNum], windows,
|
||||
numWindows);
|
||||
free(windows);
|
||||
}
|
||||
#else
|
||||
XSetWMColormapWindows(xnestDisplay, xnestDefaultWindows[pScreen->myNum],
|
||||
icws.windows, numWindows);
|
||||
#endif
|
||||
|
||||
xnestOldInstalledColormapWindows = icws.windows;
|
||||
xnestNumOldInstalledColormapWindows = icws.numWindows;
|
||||
|
@ -274,19 +260,8 @@ xnestSetScreenSaverColormapWindow(ScreenPtr pScreen)
|
|||
{
|
||||
free(xnestOldInstalledColormapWindows);
|
||||
|
||||
#ifdef _XSERVER64
|
||||
{
|
||||
Window64 window;
|
||||
|
||||
window = xnestScreenSaverWindows[pScreen->myNum];
|
||||
XSetWMColormapWindows(xnestDisplay, xnestDefaultWindows[pScreen->myNum],
|
||||
&window, 1);
|
||||
xnestScreenSaverWindows[pScreen->myNum] = window;
|
||||
}
|
||||
#else
|
||||
XSetWMColormapWindows(xnestDisplay, xnestDefaultWindows[pScreen->myNum],
|
||||
&xnestScreenSaverWindows[pScreen->myNum], 1);
|
||||
#endif /* _XSERVER64 */
|
||||
|
||||
xnestOldInstalledColormapWindows = NULL;
|
||||
xnestNumOldInstalledColormapWindows = 0;
|
||||
|
@ -389,25 +364,8 @@ void
|
|||
xnestStoreColors(ColormapPtr pCmap, int nColors, xColorItem * pColors)
|
||||
{
|
||||
if (pCmap->pVisual->class & DynamicClass)
|
||||
#ifdef _XSERVER64
|
||||
{
|
||||
int i;
|
||||
XColor *pColors64 = xallocarray(nColors, sizeof(XColor));
|
||||
|
||||
for (i = 0; i < nColors; ++i) {
|
||||
pColors64[i].pixel = pColors[i].pixel;
|
||||
pColors64[i].red = pColors[i].red;
|
||||
pColors64[i].green = pColors[i].green;
|
||||
pColors64[i].blue = pColors[i].blue;
|
||||
pColors64[i].flags = pColors[i].flags;
|
||||
}
|
||||
XStoreColors(xnestDisplay, xnestColormap(pCmap), pColors64, nColors);
|
||||
free(pColors64);
|
||||
}
|
||||
#else
|
||||
XStoreColors(xnestDisplay, xnestColormap(pCmap),
|
||||
(XColor *) pColors, nColors);
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -129,26 +129,9 @@ xnestKeyboardProc(DeviceIntPtr pDev, int onoff)
|
|||
switch (onoff) {
|
||||
case DEVICE_INIT:
|
||||
XDisplayKeycodes(xnestDisplay, &min_keycode, &max_keycode);
|
||||
#ifdef _XSERVER64
|
||||
{
|
||||
KeySym64 *keymap64;
|
||||
int len;
|
||||
|
||||
keymap64 = XGetKeyboardMapping(xnestDisplay,
|
||||
min_keycode,
|
||||
max_keycode - min_keycode + 1,
|
||||
&mapWidth);
|
||||
len = (max_keycode - min_keycode + 1) * mapWidth;
|
||||
keymap = xallocarray(len, sizeof(KeySym));
|
||||
for (i = 0; i < len; ++i)
|
||||
keymap[i] = keymap64[i];
|
||||
XFree(keymap64);
|
||||
}
|
||||
#else
|
||||
keymap = XGetKeyboardMapping(xnestDisplay,
|
||||
min_keycode,
|
||||
max_keycode - min_keycode + 1, &mapWidth);
|
||||
#endif
|
||||
|
||||
memset(modmap, 0, sizeof(modmap));
|
||||
modifier_keymap = XGetModifierMapping(xnestDisplay);
|
||||
|
|
|
@ -28,63 +28,8 @@ from the X Consortium.
|
|||
|
||||
*/
|
||||
|
||||
/*
|
||||
** Machines with a 64 bit library interface and a 32 bit server require
|
||||
** name changes to protect the guilty.
|
||||
*/
|
||||
#ifdef _XSERVER64
|
||||
#define _XSERVER64_tmp
|
||||
#undef _XSERVER64
|
||||
typedef unsigned long XID64;
|
||||
typedef unsigned long Mask64;
|
||||
typedef unsigned long Atom64;
|
||||
typedef unsigned long VisualID64;
|
||||
typedef unsigned long Time64;
|
||||
|
||||
#define XID XID64
|
||||
#define Mask Mask64
|
||||
#define Atom Atom64
|
||||
#define VisualID VisualID64
|
||||
#define Time Time64
|
||||
typedef XID Window64;
|
||||
typedef XID Drawable64;
|
||||
typedef XID Font64;
|
||||
typedef XID Pixmap64;
|
||||
typedef XID Cursor64;
|
||||
typedef XID Colormap64;
|
||||
typedef XID GContext64;
|
||||
typedef XID KeySym64;
|
||||
|
||||
#define Window Window64
|
||||
#define Drawable Drawable64
|
||||
#define Font Font64
|
||||
#define Pixmap Pixmap64
|
||||
#define Cursor Cursor64
|
||||
#define Colormap Colormap64
|
||||
#define GContext GContext64
|
||||
#define KeySym KeySym64
|
||||
#endif /*_XSERVER64*/
|
||||
|
||||
#define GC XlibGC
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xutil.h>
|
||||
#include <X11/extensions/shape.h>
|
||||
#undef GC
|
||||
|
||||
#ifdef _XSERVER64_tmp
|
||||
#define _XSERVER64
|
||||
#undef _XSERVER64_tmp
|
||||
#undef XID
|
||||
#undef Mask
|
||||
#undef Atom
|
||||
#undef VisualID
|
||||
#undef Time
|
||||
#undef Window
|
||||
#undef Drawable
|
||||
#undef Font
|
||||
#undef Pixmap
|
||||
#undef Cursor
|
||||
#undef Colormap
|
||||
#undef GContext
|
||||
#undef KeySym
|
||||
#endif /*_XSERVER64_tmp*/
|
||||
|
|
Loading…
Reference in New Issue