Commit 2c03bd79 authored by Ulrich Sibiller's avatar Ulrich Sibiller Committed by Mike Gabriel

nxagent: drop CYGWIN and WIN32 defines

parent f3aca240
...@@ -1744,7 +1744,6 @@ FIXME: Is this needed? ...@@ -1744,7 +1744,6 @@ FIXME: Is this needed?
nxagentDisplay = NULL; nxagentDisplay = NULL;
} }
Bool nxagentMakeIcon(Display *display, Pixmap *nxIcon, Pixmap *nxMask) Bool nxagentMakeIcon(Display *display, Pixmap *nxIcon, Pixmap *nxMask)
{ {
char** agentIconData; char** agentIconData;
......
...@@ -726,8 +726,6 @@ void nxagentShadowBlockHandler(void * data, struct timeval **timeout, void * mas ...@@ -726,8 +726,6 @@ void nxagentShadowBlockHandler(void * data, struct timeval **timeout, void * mas
} }
#endif #endif
#ifndef __CYGWIN32__
if (nxagentReadEvents(nxagentDisplay) > 0 || if (nxagentReadEvents(nxagentDisplay) > 0 ||
nxagentReadEvents(nxagentShadowDisplay) > 0) nxagentReadEvents(nxagentShadowDisplay) > 0)
{ {
...@@ -745,19 +743,6 @@ void nxagentShadowBlockHandler(void * data, struct timeval **timeout, void * mas ...@@ -745,19 +743,6 @@ void nxagentShadowBlockHandler(void * data, struct timeval **timeout, void * mas
nxagentShadowAdaptToRatio(); nxagentShadowAdaptToRatio();
} }
#else
if (nxagentReadEvents(nxagentDisplay) > 0)
{
#ifdef TEST
fprintf(stderr, "nxagentShadowBlockHandler: Reading X events queued.\n");
#endif
nxagentDispatchEvents(NULL);
}
#endif
changed = 0; changed = 0;
NXShadowGetScreenSize(&width_, &height_); NXShadowGetScreenSize(&width_, &height_);
...@@ -800,26 +785,6 @@ FIXME: Must queue multiple writes and handle the events by resembling ...@@ -800,26 +785,6 @@ FIXME: Must queue multiple writes and handle the events by resembling
*timeout = &zero; *timeout = &zero;
} }
#ifdef __CYGWIN32__
if (nxagentOption(SleepTime) > 0) {
#ifdef TEST
fprintf(stderr, "nxagentShadowBlockHandler: sleeping for %d milliseconds for slowdown.\n",
nxagentOption(SleepTime));
#endif
usleep(nxagentOption(SleepTime) * 1000);
}
#ifdef TEST
else if (0 == nxagentOption(SleepTime)) {
fprintf(stderr, "nxagentShadowBlockHandler: not sleeping for slowdown.\n");
}
#endif
(*timeout) -> tv_sec = 0;
(*timeout) -> tv_usec = 50 * 1000;
#else
if (changed == 0) if (changed == 0)
{ {
(*timeout) -> tv_sec = 0; (*timeout) -> tv_sec = 0;
...@@ -831,8 +796,6 @@ FIXME: Must queue multiple writes and handle the events by resembling ...@@ -831,8 +796,6 @@ FIXME: Must queue multiple writes and handle the events by resembling
(*timeout) -> tv_usec = 0; (*timeout) -> tv_usec = 0;
} }
#endif
nxagentPrintGeometry(); nxagentPrintGeometry();
#ifdef BLOCKS #ifdef BLOCKS
...@@ -857,7 +820,6 @@ void nxagentShadowWakeupHandler(void * data, int count, void * mask) ...@@ -857,7 +820,6 @@ void nxagentShadowWakeupHandler(void * data, int count, void * mask)
if (!SmartScheduleSignalEnable) if (!SmartScheduleSignalEnable)
{ {
#ifdef DEBUG #ifdef DEBUG
fprintf(stderr, "nxagentShadowWakeupHandler: Resetting the dispatch state after wakeup.\n"); fprintf(stderr, "nxagentShadowWakeupHandler: Resetting the dispatch state after wakeup.\n");
#endif #endif
...@@ -866,7 +828,6 @@ void nxagentShadowWakeupHandler(void * data, int count, void * mask) ...@@ -866,7 +828,6 @@ void nxagentShadowWakeupHandler(void * data, int count, void * mask)
nxagentDispatch.in = nxagentBytesIn; nxagentDispatch.in = nxagentBytesIn;
nxagentDispatch.out = nxagentBytesOut; nxagentDispatch.out = nxagentBytesOut;
} }
/* /*
......
...@@ -107,16 +107,8 @@ void nxagentInitOptions(void) ...@@ -107,16 +107,8 @@ void nxagentInitOptions(void)
nxagentOptions.ViewportXSpan = 0; nxagentOptions.ViewportXSpan = 0;
nxagentOptions.ViewportYSpan = 0; nxagentOptions.ViewportYSpan = 0;
#ifndef __CYGWIN32__
nxagentOptions.DesktopResize = 1; nxagentOptions.DesktopResize = 1;
#else
nxagentOptions.DesktopResize = 0;
#endif
nxagentOptions.Ratio = DONT_SCALE; nxagentOptions.Ratio = DONT_SCALE;
nxagentOptions.XRatio = DONT_SCALE; nxagentOptions.XRatio = DONT_SCALE;
nxagentOptions.YRatio = DONT_SCALE; nxagentOptions.YRatio = DONT_SCALE;
......
...@@ -2572,8 +2572,6 @@ int nxagentShadowInit(ScreenPtr pScreen, WindowPtr pWin) ...@@ -2572,8 +2572,6 @@ int nxagentShadowInit(ScreenPtr pScreen, WindowPtr pWin)
nxagentShadowUid); nxagentShadowUid);
#endif #endif
#if !defined (__CYGWIN32__) && !defined (WIN32)
if (nxagentShadowUid != -1) if (nxagentShadowUid != -1)
{ {
NXShadowSetDisplayUid(nxagentShadowUid); NXShadowSetDisplayUid(nxagentShadowUid);
...@@ -2584,8 +2582,6 @@ int nxagentShadowInit(ScreenPtr pScreen, WindowPtr pWin) ...@@ -2584,8 +2582,6 @@ int nxagentShadowInit(ScreenPtr pScreen, WindowPtr pWin)
NXShadowDisableDamage(); NXShadowDisableDamage();
} }
#endif
if (NXShadowCreate(nxagentDisplay, layout, nxagentShadowDisplayName, if (NXShadowCreate(nxagentDisplay, layout, nxagentShadowDisplayName,
(void *) &nxagentShadowDisplay) != 1) (void *) &nxagentShadowDisplay) != 1)
{ {
...@@ -2602,13 +2598,10 @@ int nxagentShadowInit(ScreenPtr pScreen, WindowPtr pWin) ...@@ -2602,13 +2598,10 @@ int nxagentShadowInit(ScreenPtr pScreen, WindowPtr pWin)
* server root window in order to notify its presence. * server root window in order to notify its presence.
*/ */
#ifndef __CYGWIN__
XlibAtom nxagentShadowAtom = XInternAtom(nxagentShadowDisplay, "_NX_SHADOW", False); XlibAtom nxagentShadowAtom = XInternAtom(nxagentShadowDisplay, "_NX_SHADOW", False);
XChangeProperty(nxagentShadowDisplay, DefaultRootWindow(nxagentShadowDisplay), XChangeProperty(nxagentShadowDisplay, DefaultRootWindow(nxagentShadowDisplay),
nxagentShadowAtom, XA_STRING, 8, PropModeReplace, NULL, 0); nxagentShadowAtom, XA_STRING, 8, PropModeReplace, NULL, 0);
#endif
if (NXShadowAddUpdaterDisplay(nxagentDisplay, &nxagentShadowWidth, if (NXShadowAddUpdaterDisplay(nxagentDisplay, &nxagentShadowWidth,
&nxagentShadowHeight, &nxagentMasterDepth) == 0) &nxagentShadowHeight, &nxagentMasterDepth) == 0)
...@@ -2621,8 +2614,6 @@ int nxagentShadowInit(ScreenPtr pScreen, WindowPtr pWin) ...@@ -2621,8 +2614,6 @@ int nxagentShadowInit(ScreenPtr pScreen, WindowPtr pWin)
return -1; return -1;
} }
#ifndef __CYGWIN32__
if (nxagentOption(Fullscreen) == 1) if (nxagentOption(Fullscreen) == 1)
{ {
nxagentShadowSetRatio(WidthOfScreen(DefaultScreenOfDisplay(nxagentDisplay)) * 1.0 / nxagentShadowWidth, nxagentShadowSetRatio(WidthOfScreen(DefaultScreenOfDisplay(nxagentDisplay)) * 1.0 / nxagentShadowWidth,
...@@ -2671,8 +2662,6 @@ int nxagentShadowInit(ScreenPtr pScreen, WindowPtr pWin) ...@@ -2671,8 +2662,6 @@ int nxagentShadowInit(ScreenPtr pScreen, WindowPtr pWin)
return -1; return -1;
} }
#endif
nxagentShadowDepth = pScreen -> rootDepth; nxagentShadowDepth = pScreen -> rootDepth;
switch (nxagentMasterDepth) switch (nxagentMasterDepth)
...@@ -2757,14 +2746,10 @@ int nxagentShadowInit(ScreenPtr pScreen, WindowPtr pWin) ...@@ -2757,14 +2746,10 @@ int nxagentShadowInit(ScreenPtr pScreen, WindowPtr pWin)
nxagentBppShadow = 1; nxagentBppShadow = 1;
} }
#ifndef __CYGWIN__
imageByteOrder = nxagentShadowDisplay -> byte_order; imageByteOrder = nxagentShadowDisplay -> byte_order;
nxagentShadowXConnectionNumber = XConnectionNumber(nxagentShadowDisplay); nxagentShadowXConnectionNumber = XConnectionNumber(nxagentShadowDisplay);
#endif
#ifdef TEST #ifdef TEST
fprintf(stderr, "nxagentShadowInit: Adding the X connection [%d] " fprintf(stderr, "nxagentShadowInit: Adding the X connection [%d] "
"to the device set.\n", nxagentShadowXConnectionNumber); "to the device set.\n", nxagentShadowXConnectionNumber);
...@@ -2985,18 +2970,6 @@ int nxagentShadowPoll(PixmapPtr nxagentShadowPixmapPtr, GCPtr nxagentShadowGCPtr ...@@ -2985,18 +2970,6 @@ int nxagentShadowPoll(PixmapPtr nxagentShadowPixmapPtr, GCPtr nxagentShadowGCPtr
RegionNull(&updateRegion); RegionNull(&updateRegion);
RegionNull(&tempRegion); RegionNull(&tempRegion);
#ifdef __CYGWIN32__
if (NXShadowCaptureCursor(nxagentWindow(nxagentShadowWindowPtr),
nxagentShadowWindowPtr -> drawable.pScreen -> visuals) == -1)
{
#ifdef WARNING
fprintf(stderr, "nxagentShadowPoll: Failed to capture cursor.\n");
#endif
}
#endif
int result = NXShadowHasChanged(nxagentUserInput, NULL, suspended); int result = NXShadowHasChanged(nxagentUserInput, NULL, suspended);
*changed = result; *changed = result;
...@@ -3074,17 +3047,10 @@ int nxagentShadowPoll(PixmapPtr nxagentShadowPixmapPtr, GCPtr nxagentShadowGCPtr ...@@ -3074,17 +3047,10 @@ int nxagentShadowPoll(PixmapPtr nxagentShadowPixmapPtr, GCPtr nxagentShadowGCPtr
tBuffer = iBuffer; tBuffer = iBuffer;
#ifdef __CYGWIN32__
if (nxagentBppMaster == 2)
{
NXShadowCorrectColor(length, tBuffer);
}
#else
if (nxagentCheckDepth == 1) if (nxagentCheckDepth == 1)
{ {
nxagentShadowAdaptDepth(width, height, line, &tBuffer); nxagentShadowAdaptDepth(width, height, line, &tBuffer);
} }
#endif
fbPutImage(nxagentVirtualDrawable((DrawablePtr)nxagentShadowPixmapPtr), nxagentShadowGCPtr, fbPutImage(nxagentVirtualDrawable((DrawablePtr)nxagentShadowPixmapPtr), nxagentShadowGCPtr,
nxagentShadowDepth, x, y, width, height, 0, ZPixmap, tBuffer); nxagentShadowDepth, x, y, width, height, 0, ZPixmap, tBuffer);
......
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