Commit 45b970f2 authored by Reinhard Tartler's avatar Reinhard Tartler

Imported nxagent-3.3.0-6.tar.gz

Summary: Imported nxagent-3.3.0-6.tar.gz Keywords: Imported nxagent-3.3.0-6.tar.gz into Git repository
parent 22914447
ChangeLog:
nxagent-3.3.0-18
- The area to restore from the backing store is limited by the screen
size instead of the visible screen.
nxagent-3.3.0-17
- Fixed TR12F02150. The agent could crash when copying text from VNC
viewer. Fixed by aborting the procedure in case the retrieved pro-
perty has not a valid format.
nxagent-3.3.0-16
- Fixed TR07G02247. Don't try to call XSetWindowColormap() if the
window has no colormap, e.g. if its class is InputOnly.
nxagent-3.3.0-15
- Fixed TR04G02210. Region is cut to the visible screen before re-
storing areas from the backing store.
- Fixed TR07G02246. Box is shrinked if bounds can't stay in a short
signed integer.
nxagent-3.3.0-14
- Fixed TR03G02206. waitpid() call was missing for the "Fonts replace-
ment" dialog type.
- Fixed TR03G02195. Added a properties structure compatible with 32
and 64 bit platform types.
nxagent-3.3.0-13
- Handle the window unmap immediately. Don't add it to the configure
queue.
nxagent-3.3.0-12
- Fixed TR03G02200. Timestamps could be in the future in KeyRelease
events sent to the X clients.
- Added debug logging of input devices state Logging can be enabled
or disabled via the Ctrl+Alt+x shortcut. State info is dumped every
5 seconds.
- Added Ctrl+Alt+y shortcut used to deactivate input devices grab for
debug purposes.
nxagent-3.3.0-11
- Changed the message logging the screen size changes, in order to
show the fullscreen state.
- Handle the window unmapping in the nxagentConfigureWindow queue.
nxagent-3.3.0-10
- Fixed TR12F02146. Compare the drawable and the bitmap data before
realizing the image update, in order to delay the data clean up that
caused the memcmp() failure.
- Fixed TR01G02156. Reduce the exposing area by subtracting the ex-
posed region.
- Fixed a compile warning in Drawable.c.
- Added detailed logs in the nxagentSynchronizeRegion() function if
the data memory allocation fails.
nxagent-3.3.0-9
- Added /usr/NX/share/base to alternate font paths. This would fix
TR11F02130 if fonts fixed and cursor are installed there.
- Changed Keyboard initialization and reset. This change should fix
TR11F02129, TR11F02131, TR11F02132.
nxagent-3.3.0-8
- Fixed TR12F02144. Image bits of render glyphs are copied before they
are cleaned. This will avoid a memory corruption.
- Fixed TR12F02145. When dispatching a MotionNotify event, check if a
top-level window has been entered before trying to show the pulldown
dialog.
nxagent-3.3.0-7
- Added debug code for pointer input.
nxagent-3.3.0-6
- Fixed compile warnings.
......
......@@ -680,30 +680,6 @@ void nxagentCollectPropertyEvent(int resource)
return;
}
if (resultFormat != 8 && resultFormat != 16 && resultFormat != 32)
{
#ifdef DEBUG
fprintf (stderr, "nxagentCollectPropertyEvent: WARNING! Invalid property "
"value.\n");
#endif
if (lastClientClientPtr != NULL)
{
nxagentSendSelectionNotify(None);
}
lastClientWindowPtr = NULL;
lastClientStage = SelectionStageNone;
if (pszReturnData != NULL)
{
XFree(pszReturnData);
}
return;
}
switch (lastClientStage)
{
......
......@@ -291,20 +291,9 @@ void nxagentSetInstalledColormapWindows(ScreenPtr pScreen)
pCmap = (ColormapPtr)LookupIDByType(pScreen->defColormap,
RT_COLORMAP);
if (pCmap != NULL)
{
XSetWindowColormap(nxagentDisplay,
nxagentDefaultWindows[pScreen->myNum],
nxagentColormap(pCmap));
}
#ifdef WARNING
else
{
fprintf(stderr, "nxagentSetInstalledColormapWindows: WARNING! "
"Window at [%p] has no colormap with class [%d].\n",
pWin, pWin -> drawable.class);
}
#endif
XSetWindowColormap(nxagentDisplay,
nxagentDefaultWindows[pScreen->myNum],
nxagentColormap(pCmap));
}
#endif /* DUMB_WINDOW_MANAGERS */
}
......
......@@ -42,7 +42,7 @@ extern int nxagentKillDialogPid;
extern int nxagentSuspendDialogPid;
extern int nxagentRootlessDialogPid;
extern int nxagentPulldownDialogPid;
extern int nxagentFontsReplacementDialogPid;
extern int nxagentFontsReplacement;
extern int nxagentEnableRandRModeDialogPid;
extern int nxagentDisableRandRModeDialogPid;
extern int nxagentEnableDeferModePid;
......
......@@ -453,21 +453,6 @@ static void nxagentSigchldHandler(int signal)
}
}
if (pid == 0 && nxagentFontsReplacementDialogPid)
{
pid = waitpid(nxagentFontsReplacementDialogPid, &status, options);
if (pid == -1 && errno == ECHILD)
{
#ifdef WARNING
fprintf(stderr, "nxagentSigchldHandler: Got ECHILD waiting for child %d (Fonts replacement).\n",
nxagentFontsReplacementDialogPid);
#endif
pid = nxagentFontsReplacementDialogPid = 0;
}
}
if (pid == 0 && nxagentEnableRandRModeDialogPid)
{
pid = waitpid(nxagentEnableRandRModeDialogPid, &status, options);
......
......@@ -32,7 +32,6 @@
#include "Handlers.h"
#include "Pixels.h"
#include "Reconnect.h"
#include "GCOps.h"
#include "NXlib.h"
......@@ -419,14 +418,13 @@ int nxagentSynchronizeRegion(DrawablePtr pDrawable, RegionPtr pRegion, unsigned
if (useStoredBitmap != 0)
{
#ifdef TEST
fprintf(stderr, "nxagentSynchronizeRegion: Drawable [%s] at [%p] has a synchronization bitmap at [%p] "
fprintf(stderr, "nxagentSynchronizeRegion: Drawable [%s] at [%p] has a synchronization bitmap "
"[%d,%d,%d,%d] with [%ld] rects.\n", nxagentDrawableType(pDrawable),
(void *) pDrawable, (void *) nxagentDrawableBitmap(pDrawable),
nxagentCorruptedRegion((DrawablePtr) nxagentDrawableBitmap(pDrawable)) -> extents.x1,
nxagentCorruptedRegion((DrawablePtr) nxagentDrawableBitmap(pDrawable)) -> extents.y1,
nxagentCorruptedRegion((DrawablePtr) nxagentDrawableBitmap(pDrawable)) -> extents.x2,
nxagentCorruptedRegion((DrawablePtr) nxagentDrawableBitmap(pDrawable)) -> extents.y2,
REGION_NUM_RECTS(nxagentCorruptedRegion((DrawablePtr) nxagentDrawableBitmap(pDrawable))));
(void *) pDrawable, nxagentCorruptedRegion((DrawablePtr) nxagentDrawableBitmap(pDrawable)) -> extents.x1,
nxagentCorruptedRegion((DrawablePtr) nxagentDrawableBitmap(pDrawable)) -> extents.y1,
nxagentCorruptedRegion((DrawablePtr) nxagentDrawableBitmap(pDrawable)) -> extents.x2,
nxagentCorruptedRegion((DrawablePtr) nxagentDrawableBitmap(pDrawable)) -> extents.y2,
REGION_NUM_RECTS(nxagentCorruptedRegion((DrawablePtr) nxagentDrawableBitmap(pDrawable))));
#endif
clipRegion = nxagentCreateRegion(pDrawable, NULL, 0, 0, pDrawable -> width, pDrawable -> height);
......@@ -583,7 +581,8 @@ int nxagentSynchronizeRegion(DrawablePtr pDrawable, RegionPtr pRegion, unsigned
#ifdef TEST
fprintf(stderr, "nxagentSynchronizeRegion: Going to synchronize [%ld] rects of [%s] at [%p].\n",
REGION_NUM_RECTS(clipRegion), nxagentDrawableType(pDrawable), (void *) pDrawable);
REGION_NUM_RECTS(clipRegion), (pDrawable -> type == DRAWABLE_PIXMAP ? "Pixmap" : "Window"),
(void *) pDrawable);
fprintf(stderr, "nxagentSynchronizeRegion: Extents geometry [%d,%d,%d,%d].\n",
clipRegion -> extents.x1, clipRegion -> extents.y1, clipRegion -> extents.x2, clipRegion -> extents.y2);
......@@ -616,22 +615,7 @@ int nxagentSynchronizeRegion(DrawablePtr pDrawable, RegionPtr pRegion, unsigned
if (data == NULL)
{
#ifdef WARNING
fprintf(stderr, "nxagentSynchronizeRegion: WARNING! Failed to allocate memory for synchronization.\n");
/*
* Print detailed informations if the
* image length is zero.
*/
if (length == 0)
{
fprintf(stderr, "nxagentSynchronizeRegion: Drawable [%s] at [%p] with region geometry [%ld][%d,%d,%d,%d].\n",
nxagentDrawableType(pDrawable), (void *) pDrawable, REGION_NUM_RECTS(clipRegion),
clipRegion -> extents.x1, clipRegion -> extents.y1,
clipRegion -> extents.x2, clipRegion -> extents.y2);
}
#endif
goto nxagentSynchronizeRegionFree;
......@@ -686,14 +670,10 @@ int nxagentSynchronizeRegion(DrawablePtr pDrawable, RegionPtr pRegion, unsigned
if (nxagentDrawableStatus(pDrawable) == Synchronized)
{
#ifdef WARNING
if (pDrawable -> type == DRAWABLE_WINDOW && pSrcDrawable != pDrawable)
{
fprintf(stderr, "nxagentSynchronizeRegion: WARNING! Trying to synchronize "
"the clean drawable type [%d] at [%p] with source at [%p].\n",
pDrawable -> type, (void *) pDrawable, (void *) pSrcDrawable);
}
#endif
goto nxagentSynchronizeRegionStop;
......@@ -768,6 +748,9 @@ int nxagentSynchronizeRegion(DrawablePtr pDrawable, RegionPtr pRegion, unsigned
nxagentGetImage(pSrcDrawable, x, y, w, h, format, AllPlanes, data);
nxagentRealizeImage(pDrawable, pGC, pDrawable -> depth,
x, y, w, h, leftPad, format, data);
/*
* Going to unmark the synchronized
* region.
......@@ -822,13 +805,6 @@ int nxagentSynchronizeRegion(DrawablePtr pDrawable, RegionPtr pRegion, unsigned
nxagentUnmarkCorruptedRegion(pDrawable, &tileRegion);
}
#ifdef TEST
else
{
fprintf(stderr, "nxagentSynchronizeRegion: Tile [%d,%d,%d,%d] on drawable [%p] doesn't match.\n",
x, y, x + w, y + h, (void *) pDrawable);
}
#endif
}
else
{
......@@ -859,14 +835,6 @@ int nxagentSynchronizeRegion(DrawablePtr pDrawable, RegionPtr pRegion, unsigned
}
}
/*
* Realize the image after comparing the
* source data with the bitmap data.
*/
nxagentRealizeImage(pDrawable, pGC, pDrawable -> depth,
x, y, w, h, leftPad, format, data);
REGION_UNINIT(pDrawable -> pScreen, &tileRegion);
#if !defined(COLLECTED_UPDATES)
......@@ -2587,13 +2555,16 @@ void nxagentCreateDrawableBitmap(DrawablePtr pDrawable)
GCPtr pGC = NULL;
RegionPtr pClipRegion = NullRegion;
char *data = NULL;
int x, y;
int w, h;
int length, format;
int saveTrap;
#ifdef TEST
fprintf(stderr, "nxagentCreateDrawableBitmap: Creating synchronization bitmap for [%s] at [%p].\n",
nxagentDrawableType(pDrawable), (void *) pDrawable);
fprintf(stderr, "nxagentCreateDrawableBitmap: Creating synchronization bitmap for drawable at [%p].\n",
(void *) pDrawable);
#endif
/*
......@@ -2681,8 +2652,24 @@ void nxagentCreateDrawableBitmap(DrawablePtr pDrawable)
w = pClipRegion -> extents.x2 - pClipRegion -> extents.x1;
h = pClipRegion -> extents.y2 - pClipRegion -> extents.y1;
nxagentCopyArea(pDrawable, (DrawablePtr) pBitmap, pGC, x, y, w, h, x, y);
data = nxagentAllocateImageData(w, h, pDrawable -> depth, &length, &format);
if (data == NULL)
{
#ifdef WARNING
fprintf(stderr, "nxagentCreateDrawableBitmap: Cannot allocate memory for the bitmap data.\n");
#endif
nxagentDestroyPixmap(pBitmap);
goto nxagentCreateDrawableBitmapEnd;
}
nxagentGetImage(pDrawable, x, y, w, h, format, AllPlanes, data);
nxagentPutImage((DrawablePtr) pBitmap, pGC, pBitmap -> drawable.depth, x, y, w, h,
0, format, data);
REGION_UNION(pDrawable -> pScreen, nxagentCorruptedRegion((DrawablePtr) pBitmap),
nxagentCorruptedRegion((DrawablePtr) pBitmap), pClipRegion);
......@@ -2724,6 +2711,11 @@ nxagentCreateDrawableBitmapEnd:
nxagentFreeRegion(pDrawable, pClipRegion);
}
if (data != NULL)
{
xfree(data);
}
if (pGC != NULL)
{
FreeScratchGC(pGC);
......@@ -3099,16 +3091,6 @@ void nxagentSendBackgroundExpose(WindowPtr pWin, PixmapPtr pBackground, RegionPt
REGION_INTERSECT(pWin -> pScreen, &expose, &expose, &pWin -> clipList);
/*
* Reduce the overall region to expose.
*/
REGION_TRANSLATE(pWin -> pScreen, &expose, -pWin -> drawable.x, -pWin -> drawable.y);
REGION_SUBTRACT(pWin -> pScreen, pExpose, pExpose, &expose);
REGION_TRANSLATE(pWin -> pScreen, &expose, pWin -> drawable.x, pWin -> drawable.y);
miWindowExposures(pWin, &expose, &expose);
nxagentSendBackgroundExposeEnd:
......
......@@ -65,34 +65,26 @@ is" without express or implied warranty.
#define NXAGENT_ALTERNATE_FONT_DIR "/usr/share/X11/fonts"
#define NXAGENT_ALTERNATE_FONT_DIR_2 "/usr/share/fonts/X11"
#define NXAGENT_ALTERNATE_FONT_DIR_3 "/usr/share/fonts"
#define NXAGENT_ALTERNATE_FONT_DIR_4 "/usr/NX/share/fonts"
#define NXAGENT_DEFAULT_FONT_PATH \
"/usr/X11R6/lib/X11/fonts/misc/,/usr/X11R6/lib/X11/fonts/Speedo/,\
/usr/X11R6/lib/X11/fonts/Type1/,/usr/X11R6/lib/X11/fonts/75dpi/,\
/usr/X11R6/lib/X11/fonts/100dpi/,/usr/X11R6/lib/X11/fonts/TTF/,\
/usr/NX/share/fonts/base"
/usr/X11R6/lib/X11/fonts/100dpi/,/usr/X11R6/lib/X11/fonts/TTF/"
#define NXAGENT_ALTERNATE_FONT_PATH \
"/usr/share/X11/fonts/misc/,/usr/share/X11/fonts/Speedo/,\
/usr/share/X11/fonts/Type1/,/usr/share/X11/fonts/75dpi/,\
/usr/share/X11/fonts/100dpi/,/usr/share/X11/fonts/TTF/,\
/usr/NX/share/fonts/base"
/usr/share/X11/fonts/100dpi/,/usr/share/X11/fonts/TTF/"
#define NXAGENT_ALTERNATE_FONT_PATH_2 \
"/usr/share/fonts/X11/misc/,/usr/share/fonts/X11/Speedo/,\
/usr/share/fonts/X11/Type1/,/usr/share/fonts/X11/75dpi/,\
/usr/share/fonts/X11/100dpi/,/usr/share/fonts/X11/TTF/,\
/usr/NX/share/fonts/base"
/usr/share/fonts/X11/100dpi/,/usr/share/fonts/X11/TTF/"
#define NXAGENT_ALTERNATE_FONT_PATH_3 \
"/usr/share/fonts/misc/,/usr/share/fonts/Speedo/,\
/usr/share/fonts/Type1/,/usr/share/fonts/75dpi/,\
/usr/share/fonts/100dpi/,/usr/share/fonts/TTF/,\
/usr/NX/share/fonts/base"
#define NXAGENT_ALTERNATE_FONT_PATH_4 \
"/usr/NX/share/fonts/base"
/usr/share/fonts/100dpi/,/usr/share/fonts/TTF/"
#undef NXAGENT_FONTCACHE_DEBUG
#undef NXAGENT_RECONNECT_FONT_DEBUG
......@@ -1561,31 +1553,6 @@ void nxagentVerifyDefaultFontPath(void)
strcat(fontPath, NXAGENT_ALTERNATE_FONT_PATH_3);
}
if (stat(NXAGENT_ALTERNATE_FONT_DIR_4, &dirStat) == 0 &&
S_ISDIR(dirStat.st_mode) != 0)
{
/*
* Let's use the "/usr/NX/share/fonts" path.
*/
#ifdef TEST
fprintf(stderr, "nxagentVerifyDefaultFontPath: Assuming fonts in directory [%s].\n",
validateString(NXAGENT_ALTERNATE_FONT_DIR_4));
#endif
if (*fontPath != '\0')
{
fontPath = realloc(fontPath, strlen(fontPath) + strlen(NXAGENT_ALTERNATE_FONT_PATH_4) + 2);
strcat(fontPath, ",");
}
else
{
fontPath = realloc(fontPath, strlen(fontPath) + strlen(NXAGENT_ALTERNATE_FONT_PATH_4) + 1);
}
strcat(fontPath, NXAGENT_ALTERNATE_FONT_PATH_4);
}
if (*fontPath == '\0')
{
#ifdef WARNING
......
......@@ -594,8 +594,6 @@ RegionPtr nxagentCopyArea(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable,
unsigned int format;
unsigned long planeMask = 0xffffffff;
int oldDstxyValue;
RegionPtr pDstRegion;
int skip = 0;
......@@ -607,91 +605,6 @@ RegionPtr nxagentCopyArea(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable,
(void *) pDstDrawable, srcx, srcy, dstx, dsty, width, height);
#endif
/*
* Here, before using fbDoCopy() called by fbCopyArea(),
* it should be provided that the cast in fbDoCopy() from
* int to short int would not cut off significative bits.
*/
if (dstx + pDstDrawable->x + width > 32767)
{
#ifdef WARNING
fprintf(stderr, "nxagentCopyArea: x2 exceeding short int.\n");
#endif
width = 32767 - dstx - pDstDrawable->x;
if (width <= 0)
{
#ifdef TEST
fprintf(stderr, "nxagentCopyArea: Returning null on x2 check.\n");
#endif
return NullRegion;
}
}
if (dstx + pDstDrawable->x < -32768)
{
#ifdef WARNING
fprintf(stderr, "nxagentCopyArea: x1 exceeding short int.\n");
#endif
width += pDstDrawable->x + dstx + 32768;
srcx -= pDstDrawable->x + dstx + 32768;
dstx = -32768 - pDstDrawable->x;
if (width <= 0)
{
#ifdef TEST
fprintf(stderr, "nxagentCopyArea: Returning null on x1 check.\n");
#endif
return NullRegion;
}
}
oldDstxyValue = dsty;
if (dsty + pDstDrawable->y + height > 32767)
{
#ifdef WARNING
fprintf(stderr, "nxagentCopyArea: y2 exceeding short int.\n");
#endif
height = 32767 - dsty - pDstDrawable->y;
if (height <= 0)
{
#ifdef TEST
fprintf(stderr, "nxagentCopyArea: Returning null on y2 check.\n");
#endif
return NullRegion;
}
}
if (dsty + pDstDrawable->y < -32768)
{
#ifdef WARNING
fprintf(stderr, "nxagentCopyArea: y1 exceeding short int.\n");
#endif
height += 32768 + pDstDrawable->y + dsty;
srcy -= 32768 + pDstDrawable->y + dsty;
dsty = -32768 - pDstDrawable->y;
if (height <= 0)
{
#ifdef TEST
fprintf(stderr, "nxagentCopyArea: Returning null on y1 check.\n");
#endif
return NullRegion;
}
}
if (nxagentGCTrap == 1 || nxagentShmTrap == 1)
{
if (pSrcDrawable -> type == DRAWABLE_PIXMAP &&
......
......@@ -105,13 +105,6 @@
#define MINIMUM_DISPLAY_BUFFER 512
#ifdef NX_DEBUG_INPUT
extern int nxagentDebugInputDevices;
extern unsigned long nxagentLastInputDevicesDumpTime;
extern void nxagentDumpInputDevicesState(void);
#endif
/*
* Used in the handling of the X desktop
* manager protocol.
......@@ -193,18 +186,6 @@ void nxagentBlockHandler(pointer data, struct timeval **timeout, pointer mask)
now = GetTimeInMillis();
#ifdef NX_DEBUG_INPUT
if (nxagentDebugInputDevices == 1 &&
now - nxagentLastInputDevicesDumpTime > 5000)
{
nxagentLastInputDevicesDumpTime = now;
nxagentDumpInputDevicesState();
}
#endif
if (nxagentNeedConnectionChange() == 1)
{
#ifdef TEST
......@@ -559,8 +540,6 @@ void nxagentBlockHandler(pointer data, struct timeval **timeout, pointer mask)
#endif
nxagentPrintGeometry();
#ifdef BLOCKS
fprintf(stderr, "[End block]\n");
#endif
......@@ -841,8 +820,6 @@ FIXME: Must queue multiple writes and handle
#endif
nxagentPrintGeometry();
#ifdef BLOCKS
fprintf(stderr, "[End block]\n");
#endif
......
......@@ -109,10 +109,6 @@ void nxagentEnableXkbExtension(void);
void nxagentTuneXkbWrapper(void);
void nxagentResetKeycodeConversion(void);
#endif
CARD8 nxagentConvertKeycode(CARD8 k);
#endif /* __Keyboard_H__ */
......@@ -31,12 +31,6 @@
extern Bool nxagentWMIsRunning;
extern Bool nxagentIpaq;
#ifdef NX_DEBUG_INPUT
int nxagentDebugInputDevices = 0;
unsigned long nxagentLastInputDevicesDumpTime = 0;
extern void nxagentDeactivateInputDevicesGrabs();
#endif
/*
* Set here the required log level.
*/
......@@ -215,53 +209,6 @@ int nxagentCheckSpecialKeystroke(XKeyEvent *X, enum HandleEventResult *result)
}
#endif
#ifdef NX_DEBUG_INPUT
case XK_X:
case XK_x:
{
/*
* Used to test the input devices state.
*/
if (X -> type == KeyPress)
{
if (nxagentDebugInputDevices == 0)
{
fprintf(stderr, "Info: Turning input devices debug ON.\n");
nxagentDebugInputDevices = 1;
}
else
{
fprintf(stderr, "Info: Turning input devices debug OFF.\n");
nxagentDebugInputDevices = 0;
nxagentLastInputDevicesDumpTime = 0;
}
}
return 1;
}
case XK_Y:
case XK_y:
{
/*
* Used to deactivate input devices grab.
*/
if (X -> type == KeyPress)
{
nxagentDeactivateInputDevicesGrabs();
}
return 1;
}
#endif
}
}
......
......@@ -39,11 +39,6 @@ AgentOptionsRec nxagentOptionsBackup;
AgentOptionsPtr nxagentOptionsPtr = &nxagentOptions;
/*
* If this is set, print the geometry in the block handler.
*/
unsigned int nxagentPrintGeometryFlags = 0;
/*
* This must be called at startup to initialize
* the options repository to the default values.
*/
......
......@@ -29,8 +29,6 @@
#define UNDEFINED -1
#define COPY_UNLIMITED -1
extern unsigned int nxagentPrintGeometryFlags;
typedef enum _BackingStoreMode
{
BackingStoreUndefined = -1,
......
......@@ -257,11 +257,7 @@ TODO: This should be reset only when
if ((dispatchException & DE_TERMINATE) == 0)
{
#ifdef NX_DEBUG_INPUT
fprintf(stderr, "Session: Session suspended at '%s' timestamp [%lu].\n", GetTimeAsString(), GetTimeInMillis());
#else
fprintf(stderr, "Session: Session suspended at '%s'.\n", GetTimeAsString());
#endif
}
nxagentResetDisplayHandlers();
......@@ -551,29 +547,28 @@ Bool nxagentReconnectSession(void)
goto nxagentReconnectError;
}
if (nxagentOption(ResetKeyboardAtResume) == 1 &&
(nxagentKeyboard == NULL || nxagentOldKeyboard == NULL ||
strcmp(nxagentKeyboard, nxagentOldKeyboard) != 0 ||
strcmp(nxagentKeyboard, "query") == 0))
if (nxagentOption(ResetKeyboardAtResume))
{
if (nxagentResetKeyboard() == 0)
if (nxagentKeyboard == NULL || nxagentOldKeyboard == NULL ||
strcmp(nxagentKeyboard, nxagentOldKeyboard) != 0 ||
strcmp(nxagentKeyboard, "query") == 0)
{
#ifdef WARNING
if (nxagentVerbose == 1)
if (nxagentResetKeyboard() == 0)
{
fprintf(stderr, "nxagentReconnect: Failed to reset keyboard device.\n");
}
#endif
#ifdef WARNING
if (nxagentVerbose == 1)
{
fprintf(stderr, "nxagentReconnect: Failed to reset keyboard device.\n");
}
#endif
failedStep = WINDOW_STEP;
failedStep = WINDOW_STEP;
goto nxagentReconnectError;
goto nxagentReconnectError;
}
}
}
else
{
nxagentResetKeycodeConversion();
}
nxagentXkbState.Initialized = 0;
......@@ -613,11 +608,7 @@ Bool nxagentReconnectSession(void)
goto nxagentReconnectError;
}
#ifdef NX_DEBUG_INPUT
fprintf(stderr, "Session: Session resumed at '%s' timestamp [%lu].\n", GetTimeAsString(), GetTimeInMillis());
#else
fprintf(stderr, "Session: Session resumed at '%s'.\n", GetTimeAsString());
#endif
nxagentRemoveSplashWindow(NULL);
......
......@@ -2270,7 +2270,8 @@ void nxagentAddGlyphs(GlyphSetPtr glyphSet, Glyph *gids, xGlyphInfo *gi,
normalizedImages = NULL;
if (sizeImages > 0)
if (glyphDepths[glyphSet -> fdepth] == 1 &&
nxagentServerOrder() != BitmapBitOrder(nxagentDisplay))
{
normalizedImages = xalloc(sizeImages);
......@@ -2278,11 +2279,7 @@ void nxagentAddGlyphs(GlyphSetPtr glyphSet, Glyph *gids, xGlyphInfo *gi,
{
memcpy(normalizedImages, images, sizeImages);
if (glyphDepths[glyphSet -> fdepth] == 1 &&
nxagentServerOrder() != BitmapBitOrder(nxagentDisplay))
{
BitOrderInvert ((unsigned char *) normalizedImages, sizeImages);
}
BitOrderInvert ((unsigned char *) normalizedImages, sizeImages);
}
else
{
......
......@@ -60,27 +60,6 @@ typedef struct
}
nxagentWMHints;
/*
* This structure is compatible with 32
* and 64 bit library interface. It has
* been copied from Xatomtype.h and it's
* a parameter of XChangeProperty().
*/
typedef struct
{
unsigned long flags;
long input;
long initialState;
unsigned long iconPixmap;
unsigned long iconWindow;
long iconX;
long iconY;
unsigned long iconMask;
unsigned long windowGroup;
}
nxagentPropWMHints;
WindowPtr nxagentRootlessWindow = NULL;
#define TOP_LEVEL_TABLE_UNIT 100
......@@ -450,7 +429,6 @@ int nxagentExportProperty(pWin, property, type, format, mode, nUnits, value)
Atom propertyX, typeX;
char *output = NULL;
nxagentWMHints wmHints;
nxagentPropWMHints propHints;
Bool export = False;
Bool freeMem = False;
......@@ -511,22 +489,8 @@ int nxagentExportProperty(pWin, property, type, format, mode, nUnits, value)
wmHints.flags |= InputHint;
wmHints.input = True;
/*
* Initialize the structure used in XChangeProperty().
*/
propHints.flags = wmHints.flags;
propHints.input = (wmHints.input == True ? 1 : 0);
propHints.initialState = wmHints.initial_state;
propHints.iconPixmap = wmHints.icon_pixmap;
propHints.iconWindow = wmHints.icon_window;
propHints.iconX = wmHints.icon_x;
propHints.iconY = wmHints.icon_y;
propHints.iconMask = wmHints.icon_mask;
propHints.windowGroup = wmHints.window_group;
output = (char*) &propHints;
export = True;
output = (char*) &wmHints;
export = True;
if ((wmHints.flags & IconPixmapHint) && (wmHints.icon_pixmap != None))
{
......@@ -540,17 +504,17 @@ int nxagentExportProperty(pWin, property, type, format, mode, nUnits, value)
nxagentSynchronizeRegion((DrawablePtr) icon, NullRegion, NEVER_BREAK, NULL);
}
propHints.iconPixmap = nxagentPixmap(icon);
wmHints.icon_pixmap = nxagentPixmap(icon);
}
else
{
propHints.flags &= ~IconPixmapHint;
wmHints.flags &= ~IconPixmapHint;
#ifdef WARNING
fprintf(stderr, "nxagentExportProperty: WARNING! Failed to look up icon pixmap %x from hint "
"exporting property %s type %s on window %p.\n",
(unsigned int) wmHints.icon_pixmap, propertyS, typeS,
(void *) pWin);
(void*)pWin);
#endif
}
}
......@@ -562,17 +526,17 @@ int nxagentExportProperty(pWin, property, type, format, mode, nUnits, value)
if (icon)
{
propHints.iconWindow = nxagentWindow(icon);
wmHints.icon_window = nxagentWindow(icon);
}
else
{
propHints.flags &= ~IconWindowHint;
wmHints.flags &= ~IconWindowHint;
#ifdef WARNING
fprintf(stderr, "nxagentExportProperty: WARNING! Failed to look up icon window %x from hint "
"exporting property %s type %s on window %p.\n",
(unsigned int) wmHints.icon_window, propertyS, typeS,
(void *) pWin);
(void*)pWin);
#endif
}
}
......@@ -584,17 +548,17 @@ int nxagentExportProperty(pWin, property, type, format, mode, nUnits, value)
if (icon)
{
propHints.iconMask = nxagentPixmap(icon);
wmHints.icon_mask = nxagentPixmap(icon);
}
else
{
propHints.flags &= ~IconMaskHint;
wmHints.flags &= ~IconMaskHint;
#ifdef WARNING
fprintf(stderr, "nxagentExportProperty: WARNING! Failed to look up icon mask %x from hint "
"exporting property %s type %s on window %p.\n",
(unsigned int) wmHints.icon_mask, propertyS, typeS,
(void *) pWin);
(void*)pWin);
#endif
}
}
......@@ -606,17 +570,17 @@ int nxagentExportProperty(pWin, property, type, format, mode, nUnits, value)
if (window)
{
propHints.windowGroup = nxagentWindow(window);
wmHints.window_group = nxagentWindow(window);
}
else
{
propHints.flags &= ~WindowGroupHint;
wmHints.flags &= ~WindowGroupHint;
#ifdef WARNING
fprintf(stderr, "nxagentExportProperty: WARNING! Failed to look up window group %x from hint "
"exporting property %s type %s on window %p.\n",
(unsigned int) wmHints.window_group, propertyS, typeS,
(void *) pWin);
(void*)pWin);
#endif
}
}
......
......@@ -2373,7 +2373,8 @@ FIXME: We should try to restore the previously
nxagentPrintAgentGeometry("After Resize Screen", "nxagentResizeScreen:");
#endif
nxagentSetPrintGeometry(pScreen -> myNum);
fprintf(stderr, "Info: Screen [%d] resized to geometry [%dx%d].\n",
pScreen -> myNum, width, height);
return 1;
......@@ -3045,7 +3046,7 @@ void nxagentShadowAdaptDepth(unsigned int width, unsigned int height,
#ifdef WARNING
fprintf(stderr, "nxagentCorrectDepthShadow: WARNING! Visual not found. Using default visual.\n");
#endif
pVisual = nxagentVisuals[nxagentDefaultVisualIndex].visual;
}
......@@ -3472,10 +3473,10 @@ int nxagentRRSetScreenConfig(ScreenPtr pScreen, int width, int height)
RRScreenSizePtr oldSizes;
pScrPriv = rrGetScrPriv(pScreen);
oldWidth = pScreen->width;
oldHeight = pScreen->height;
if (!pScrPriv)
{
return 1;
......@@ -3555,7 +3556,7 @@ int nxagentRRSetScreenConfig(ScreenPtr pScreen, int width, int height)
}
RREditConnectionInfo (pScreen);
/*
* Fix pointer bounds and location
*/
......@@ -3693,8 +3694,7 @@ void nxagentSaveAreas(PixmapPtr pPixmap, RegionPtr prgnSave, int xorg, int yorg,
return;
}
void nxagentRestoreAreas(PixmapPtr pPixmap, RegionPtr prgnRestore, int xorg,
int yorg, WindowPtr pWin)
void nxagentRestoreAreas(PixmapPtr pPixmap, RegionPtr prgnRestore, int xorg, int yorg, WindowPtr pWin)
{
PixmapPtr pVirtualPixmap;
RegionPtr clipRegion;
......@@ -3710,14 +3710,6 @@ void nxagentRestoreAreas(PixmapPtr pPixmap, RegionPtr prgnRestore, int xorg,
BoxRec extents;
miBSWindowPtr pBackingStore;
/*
* Limit the area to restore to the
* root window size.
*/
REGION_INTERSECT(pWin -> pScreen, prgnRestore, prgnRestore,
&WindowTable[pWin -> drawable.pScreen -> myNum] -> winSize);
pBackingStore = (miBSWindowPtr) pWin -> backStorage;
pVirtualPixmap = nxagentVirtualPixmap(pPixmap);
......@@ -3911,24 +3903,6 @@ void nxagentShadowAdaptToRatio(void)
REGION_UNINIT(pScreen, &region);
}
void nxagentPrintGeometry()
{
int i;
for (i = 0; i < screenInfo.numScreens; i++)
{
if (nxagentPrintGeometryFlags && (1 << i))
{
fprintf(stderr, "Info: Screen [%d] resized to geometry [%dx%d] "
"fullscreen [%d].\n", i, screenInfo.screens[i] -> width,
screenInfo.screens[i] -> height,
nxagentOption(Fullscreen));
}
}
nxagentPrintGeometryFlags = 0;
}
#ifdef DUMP
void nxagentShowPixmap(PixmapPtr pPixmap, int x, int y, int width, int height)
......
......@@ -36,9 +36,6 @@ is" without express or implied warranty.
#define MIN_NXAGENT_HEIGHT 60
#define NXAGENT_FRAME_WIDTH 2000
#define nxagentSetPrintGeometry(screen) \
nxagentPrintGeometryFlags = (1 << (screen));
extern int nxagentClients;
extern int nxagentAutoDisconnectTimeout;
......
......@@ -908,8 +908,6 @@ void nxagentSwitchFullscreen(ScreenPtr pScreen, Bool switchOn)
XMoveResizeWindow(nxagentDisplay, nxagentInputWindows[0], 0, 0,
nxagentOption(Width), nxagentOption(Height));
nxagentSetPrintGeometry(pScreen -> myNum);
}
#ifdef VIEWPORT_FRAME
......
......@@ -515,11 +515,7 @@ Dispatch(void)
if (serverGeneration > nxagentMaxAllowedResets)
{
#ifdef NX_DEBUG_INPUT
fprintf(stderr, "Session: Session started at '%s' timestamp [%lu].\n", GetTimeAsString(), GetTimeInMillis());
#else
fprintf(stderr, "Session: Session started at '%s'.\n", GetTimeAsString());
#endif
nxagentSessionState = SESSION_UP;
}
......
......@@ -515,11 +515,7 @@ Dispatch(void)
if (serverGeneration > nxagentMaxAllowedResets)
{
#ifdef NX_DEBUG_INPUT
fprintf(stderr, "Session: Session started at '%s' timestamp [%lu].\n", GetTimeAsString(), GetTimeInMillis());
#else
fprintf(stderr, "Session: Session started at '%s'.\n", GetTimeAsString());
#endif
nxagentSessionState = SESSION_UP;
}
......
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