Commit e9132da0 authored by Reinhard Tartler's avatar Reinhard Tartler

Imported nxagent-3.4.0-11.tar.gz

Summary: Imported nxagent-3.4.0-11.tar.gz Keywords: Imported nxagent-3.4.0-11.tar.gz into Git repository
parent 6f5e20bc
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......@@ -1208,7 +1208,7 @@ static void nxagentParseOptions(char *name, char *value)
{
nxagentChangeOption(ClientOs, ClientOsSolaris);
}
else if (strcmp(value, "mac") == 0)
else if (strcmp(value, "macosx") == 0)
{
nxagentChangeOption(ClientOs, ClientOsMac);
}
......@@ -1512,7 +1512,7 @@ N/A
int splitMode = 0;
int splitSize = 0;
unsigned int packMethod = PACK_NONE;
unsigned int packMethod = PACK_NONE;
unsigned int packQuality = 9;
int dataLevel = 0;
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......@@ -66,19 +66,21 @@ Atom nxagentAtoms[NXAGENT_NUMBER_OF_ATOMS];
static char *nxagentAtomNames[NXAGENT_NUMBER_OF_ATOMS + 1] =
{
"NX_IDENTITY", /* 0 */
"WM_PROTOCOLS", /* 1 */
"WM_DELETE_WINDOW", /* 2 */
"WM_NX_READY", /* 3 */
"MCOPGLOBALS", /* 4 */
"NX_CUT_BUFFER_SERVER", /* 5 */
"TARGETS", /* 6 */
"TEXT", /* 7 */
"NX_AGENT_SIGNATURE", /* 8 */
"NXDARWIN", /* 9 */
"CLIPBOARD", /* 10 */
"TIMESTAMP", /* 11 */
"UTF8_STRING", /* 12 */
"NX_IDENTITY", /* 0 */
"WM_PROTOCOLS", /* 1 */
"WM_DELETE_WINDOW", /* 2 */
"WM_NX_READY", /* 3 */
"MCOPGLOBALS", /* 4 */
"NX_CUT_BUFFER_SERVER", /* 5 */
"TARGETS", /* 6 */
"TEXT", /* 7 */
"NX_AGENT_SIGNATURE", /* 8 */
"NXDARWIN", /* 9 */
"CLIPBOARD", /* 10 */
"TIMESTAMP", /* 11 */
"UTF8_STRING", /* 12 */
"_NET_WM_STATE", /* 13 */
"_NET_WM_STATE_FULLSCREEN", /* 14 */
NULL,
NULL
};
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......@@ -22,7 +22,7 @@
#include "../../include/window.h"
#include "screenint.h"
#define NXAGENT_NUMBER_OF_ATOMS 14
#define NXAGENT_NUMBER_OF_ATOMS 16
extern Atom nxagentAtoms[NXAGENT_NUMBER_OF_ATOMS];
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......
ChangeLog:
nxagent-3.4.0-11
- Corrected switching between viewport mode and resize mode.
- Fixed TR04H02340. Keycode is correctly translated in shadow sessions
also if the remote X display is using evdev.
nxagent-3.4.0-10
- Handled XGrabKeyboard() return value.
- Fixed TR10D01512. NumLock and CapsLock keys are now synchronized
between local and remote.
nxagent-3.4.0-9
- Fixed TR06H02362. No icon was swown in the task bar.
- Fixed keyboard grab in fullscreen mode.
- Fixed compiler warnings.
nxagent-3.4.0-8
- Grab the keyboard in fullscreen mode on EnterNotify only if mode is
'NotifyNormal'.
- Yield control in the dispatch loop in case we stop the smart sche-
duler timer while waiting for a reply from the remote display.
nxagent-3.4.0-7
- Fixed TR08D01478. The communication with the compiz window manager
by means of the _NET_WM_PING property was not handled properly.
- Fixed a type mismatch in XKB events on 64 bit platforms.
- Moved grab/ungrab keyboard from focus in/out event to enter/leave
notify event.
- Removed nxagentIconWindow because it's not longer used.
nxagent-3.4.0-6
- Fixed TR09F02102. Problem was with pointer buttons map.
- Fixed TR02H02327. Some KeyRelease events was discarded.
- Fixed up Num and Caps locks.
- Fixed TR03H02335. Emulated right mouse button for Mac clients.
- Added utilities to print info about internal and remote windows.
- Fixed TR01F01995. Solved a picture resource leak by destroying remo-
te pictures only when their reference counter returns to zero.
- Fixed TR04H02337. Errors occurred because pictures with no drawable
were handled badly.
- Implemented handling nxagent's private for gradient pictures and so-
lid fill picture.
- Fixed BadMatch condition check in function ProcRenderComposite.
- Fixed nxagentComposite() to handle situations with source picture
drawable pointing to NULL.
- Implemented render acceleration for requests: CreateSolidFill,
CreateLinearGradient, CreateRadialGradient, CreateConicalGradient.
- Fixed TR03G02196. Dialogs are shown to the fore when the NX session
is in fullscreen mode.
- Changed mechanism to switch to fullscreen mode. Now the override
redirect attribute is no longer used and _NET_WM_STATE_FULLSCREEN
hint is sent to the WM.
nxagent-3.4.0-5
- Updated copyright to year 2010.
nxagent-3.4.0-4
- Fixed TR07F02090. Now XDMCP sessions start without problems.
- Fixed TR08G02259. Corrected window border granularity of rootless
session at reconnection on 64 bit platforms.
- Fixed TR11G02290. Forcing null timeout with queued events only if
display connection is up. This prevents the flood of session log.
- Fixed TR10G02287. Now QueryTree's loop is aborted in case of failure
and session log isn't filled anymore with repeated warning messages.
- Fixed TR01G02154. Corrected window placement when switching between
fullscreen and windowed mode.
- Fixed TR09G02276. Now the agent does not receive unwanted characters
while interacting with the local window manager.
- Implemented FR02G02174. Added ability to do large screen pans in
viewport mode through key combination Ctrl+Alt+Shift+Arrow.
- Corrected parsing of the 'client' option when the client OS is Mac.
nxagent-3.4.0-3
- Fixed TR09G02271. The array containing the font name fields was not
correctly initialized for non-standard font names.
nxagent-3.4.0-2
- Updated copyright to year 2009.
nxagent-3.4.0-1
- Opened the 3.4.0 branch based on nxagent-3.3.0-19.
- Changed the printed version number.
nxagent-3.3.0-19
- Fixed TR09G02266. A proper error message is printed in the session
log if the shadowing initialization fails because of a mismatch in
the visual class.
- Added a workaround for X servers that doesn't return 1 among the
available depths.
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
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......@@ -680,6 +680,30 @@ 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)
{
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......@@ -291,9 +291,20 @@ void nxagentSetInstalledColormapWindows(ScreenPtr pScreen)
pCmap = (ColormapPtr)LookupIDByType(pScreen->defColormap,
RT_COLORMAP);
XSetWindowColormap(nxagentDisplay,
nxagentDefaultWindows[pScreen->myNum],
nxagentColormap(pCmap));
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
}
#endif /* DUMB_WINDOW_MANAGERS */
}
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......@@ -42,7 +42,7 @@ extern int nxagentKillDialogPid;
extern int nxagentSuspendDialogPid;
extern int nxagentRootlessDialogPid;
extern int nxagentPulldownDialogPid;
extern int nxagentFontsReplacement;
extern int nxagentFontsReplacementDialogPid;
extern int nxagentEnableRandRModeDialogPid;
extern int nxagentDisableRandRModeDialogPid;
extern int nxagentEnableDeferModePid;
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......@@ -453,6 +453,21 @@ 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);
......@@ -1609,19 +1624,30 @@ void nxagentInitPixmapFormats()
nxagentNumPixmapFormats = 0;
nxagentPixmapFormats = xalloc(nxagentNumDepths * sizeof(XPixmapFormatValues));
/*
XXX: Some X server doesn't list 1 among available depths...
*/
nxagentPixmapFormats = xalloc((nxagentNumDepths + 1) * sizeof(XPixmapFormatValues));
for (i = 1; i <= MAXDEPTH; i++)
{
depth = 0;
for (j = 0; j < nxagentNumDepths; j++)
if (i == 1)
{
depth = 1;
}
else
{
if (nxagentDepths[j] == i)
for (j = 0; j < nxagentNumDepths; j++)
{
depth = i;
if (nxagentDepths[j] == i)
{
depth = i;
break;
break;
}
}
}
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......@@ -32,6 +32,7 @@
#include "Handlers.h"
#include "Pixels.h"
#include "Reconnect.h"
#include "GCOps.h"
#include "NXlib.h"
......@@ -418,13 +419,14 @@ int nxagentSynchronizeRegion(DrawablePtr pDrawable, RegionPtr pRegion, unsigned
if (useStoredBitmap != 0)
{
#ifdef TEST
fprintf(stderr, "nxagentSynchronizeRegion: Drawable [%s] at [%p] has a synchronization bitmap "
fprintf(stderr, "nxagentSynchronizeRegion: Drawable [%s] at [%p] has a synchronization bitmap at [%p] "
"[%d,%d,%d,%d] with [%ld] rects.\n", nxagentDrawableType(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))));
(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))));
#endif
clipRegion = nxagentCreateRegion(pDrawable, NULL, 0, 0, pDrawable -> width, pDrawable -> height);
......@@ -581,8 +583,7 @@ 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), (pDrawable -> type == DRAWABLE_PIXMAP ? "Pixmap" : "Window"),
(void *) pDrawable);
REGION_NUM_RECTS(clipRegion), nxagentDrawableType(pDrawable), (void *) pDrawable);
fprintf(stderr, "nxagentSynchronizeRegion: Extents geometry [%d,%d,%d,%d].\n",
clipRegion -> extents.x1, clipRegion -> extents.y1, clipRegion -> extents.x2, clipRegion -> extents.y2);
......@@ -615,7 +616,22 @@ 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;
......@@ -670,10 +686,14 @@ 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;
......@@ -748,9 +768,6 @@ 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.
......@@ -805,6 +822,13 @@ 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
{
......@@ -835,6 +859,14 @@ 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)
......@@ -2555,16 +2587,13 @@ 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 drawable at [%p].\n",
(void *) pDrawable);
fprintf(stderr, "nxagentCreateDrawableBitmap: Creating synchronization bitmap for [%s] at [%p].\n",
nxagentDrawableType(pDrawable), (void *) pDrawable);
#endif
/*
......@@ -2652,24 +2681,8 @@ void nxagentCreateDrawableBitmap(DrawablePtr pDrawable)
w = pClipRegion -> extents.x2 - pClipRegion -> extents.x1;
h = pClipRegion -> extents.y2 - pClipRegion -> extents.y1;
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);
nxagentCopyArea(pDrawable, (DrawablePtr) pBitmap, pGC, x, y, w, h, x, y);
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);
......@@ -2711,11 +2724,6 @@ nxagentCreateDrawableBitmapEnd:
nxagentFreeRegion(pDrawable, pClipRegion);
}
if (data != NULL)
{
xfree(data);
}
if (pGC != NULL)
{
FreeScratchGC(pGC);
......@@ -3091,6 +3099,16 @@ 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:
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......@@ -29,9 +29,14 @@ enum HandleEventResult
{
doNothing = 0,
doMinimize,
doDebugTree,
doCloseSession,
doStartKbd,
doSwitchFullscreen,
doViewportMoveUp,
doViewportMoveLeft,
doViewportMoveRight,
doViewportMoveDown,
doViewportLeft,
doViewportUp,
doViewportRight,
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......@@ -827,7 +827,10 @@ static XFontStruct *nxagentLoadBestQueryFont(Display* dpy, char *fontName, FontP
for (j = 0; j < numSearchFields; j++)
{
free (searchFields[j]);
if (searchFields[j] != NULL)
{
free(searchFields[j]);
}
}
}
}
......@@ -846,7 +849,10 @@ static XFontStruct *nxagentLoadBestQueryFont(Display* dpy, char *fontName, FontP
for (j = 0; j < numFontFields; j++)
{
free (fontNameFields[j]);
if (fontNameFields[j] != NULL)
{
free(fontNameFields[j]);
}
}
return fontStruct;
......@@ -1765,6 +1771,10 @@ int nxagentSplitString(char *string, char *fields[], int nfields, char *sep)
strncpy(fields[i], current, fieldlen);
*(fields[i] + fieldlen) = 0;
}
else
{
fields[i] = NULL;
}
current = next + seplen;
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......@@ -594,6 +594,8 @@ RegionPtr nxagentCopyArea(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable,
unsigned int format;
unsigned long planeMask = 0xffffffff;
int oldDstxyValue;
RegionPtr pDstRegion;
int skip = 0;
......@@ -605,6 +607,91 @@ 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 &&
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......@@ -105,6 +105,13 @@
#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.
......@@ -186,6 +193,18 @@ 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
......@@ -508,7 +527,8 @@ void nxagentBlockHandler(pointer data, struct timeval **timeout, pointer mask)
synchronize, nxagentReady);
#endif
if (nxagentQueuedEvents(nxagentDisplay) > 0)
if (NXDisplayError(nxagentDisplay) == 0 &&
nxagentQueuedEvents(nxagentDisplay) > 0)
{
#ifdef WARNING
fprintf(stderr, "nxagentBlockHandler: WARNING! Forcing a null timeout with events queued.\n");
......@@ -540,6 +560,8 @@ void nxagentBlockHandler(pointer data, struct timeval **timeout, pointer mask)
#endif
nxagentPrintGeometry();
#ifdef BLOCKS
fprintf(stderr, "[End block]\n");
#endif
......@@ -820,6 +842,8 @@ FIXME: Must queue multiple writes and handle
#endif
nxagentPrintGeometry();
#ifdef BLOCKS
fprintf(stderr, "[End block]\n");
#endif
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......
......@@ -206,7 +206,8 @@ DEFINES = -g $(OS_DEFINES) $(EXT_DEFINES) $(UPG_DEFINES) \
-DNXAGENT_SPLASH \
-DNXAGENT_ARTSD \
-UNX_DEBUG_INPUT \
-UPANORAMIX
-UPANORAMIX \
-UDEBUG_TREE
all:: $(OBJS)
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......@@ -74,7 +74,7 @@ is" without express or implied warranty.
#undef DEBUG
#undef DUMP
#define NXAGENT_VERSION "3.3.0"
#define NXAGENT_VERSION "3.4.0"
/*
* ProcVector array defined in tables.c.
......@@ -193,7 +193,7 @@ void InitOutput(ScreenInfo *screenInfo, int argc, char *argv[])
if (serverGeneration <= 1)
{
fprintf(stderr, "\nNXAGENT - Version " NXAGENT_VERSION "\n\n");
fprintf(stderr, "Copyright (C) 2001, 2007 NoMachine.\n");
fprintf(stderr, "Copyright (C) 2001, 2010 NoMachine.\n");
fprintf(stderr, "See http://www.nomachine.com/ for more information.\n\n");
fprintf(stderr, "Info: Agent running with pid '%d'.\n", getpid());
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......@@ -1791,7 +1791,6 @@ void nxagentResetKeycodeConversion(void)
{
int result;
XkbAgentInfoRec info;
XkbDescPtr xkb;
result = XkbQueryExtension(nxagentDisplay, &info.Opcode, &info.EventBase,
&info.ErrorBase, &info.MajorVersion,
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......@@ -31,6 +31,12 @@
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.
*/
......@@ -86,6 +92,18 @@ int nxagentCheckSpecialKeystroke(XKeyEvent *X, enum HandleEventResult *result)
{
switch (sym)
{
#ifdef DEBUG_TREE
case XK_q:
case XK_Q:
{
*result = doDebugTree;
break;
}
#endif /* DEBUG_TREE */
case XK_t:
case XK_T:
{
......@@ -209,6 +227,105 @@ 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
}
}
else if ((X -> state & nxagentAltMetaMask) &&
((X -> state & (ControlMask | ShiftMask)) == (ControlMask |
ShiftMask)))
{
switch (sym)
{
case XK_Left:
case XK_KP_Left:
{
if (nxagentOption(Rootless) == 0 &&
nxagentOption(DesktopResize) == 0)
{
*result = doViewportMoveLeft;
}
break;
}
case XK_Up:
case XK_KP_Up:
{
if (nxagentOption(Rootless) == 0 &&
nxagentOption(DesktopResize) == 0)
{
*result = doViewportMoveUp;
}
break;
}
case XK_Right:
case XK_KP_Right:
{
if (nxagentOption(Rootless) == 0 &&
nxagentOption(DesktopResize) == 0)
{
*result = doViewportMoveRight;
}
break;
}
case XK_Down:
case XK_KP_Down:
{
if (nxagentOption(Rootless) == 0 &&
nxagentOption(DesktopResize) == 0)
{
*result = doViewportMoveDown;
}
break;
}
}
}
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......
Copyright (C) 2001, 2007 NoMachine - http://www.nomachine.com/.
Copyright (c) 2001, 2010 NoMachine - http://www.nomachine.com/.
NXAGENT and NX extensions to X are copyright of NoMachine.
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......
......@@ -6,7 +6,7 @@
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -15,7 +15,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......
......@@ -6,7 +6,7 @@
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -15,7 +15,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......
......@@ -6,7 +6,7 @@
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -15,7 +15,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......
......@@ -6,7 +6,7 @@
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -15,7 +15,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......
......@@ -6,7 +6,7 @@
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -15,7 +15,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......
......@@ -6,7 +6,7 @@
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -15,7 +15,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......
......@@ -6,7 +6,7 @@
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -15,7 +15,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......
......@@ -6,7 +6,7 @@
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -15,7 +15,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......
......@@ -6,7 +6,7 @@
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -15,7 +15,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......
......@@ -6,7 +6,7 @@
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -15,7 +15,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......
......@@ -6,7 +6,7 @@
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -15,7 +15,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......
......@@ -6,7 +6,7 @@
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -15,7 +15,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......
......@@ -6,7 +6,7 @@
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -15,7 +15,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......
......@@ -6,7 +6,7 @@
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -15,7 +15,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......
......@@ -6,7 +6,7 @@
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -15,7 +15,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......
......@@ -6,7 +6,7 @@
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -15,7 +15,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......
......@@ -6,7 +6,7 @@
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -15,7 +15,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......
......@@ -6,7 +6,7 @@
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -15,7 +15,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......
......@@ -6,7 +6,7 @@
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -15,7 +15,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......
......@@ -6,7 +6,7 @@
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -15,7 +15,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......
......@@ -6,7 +6,7 @@
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -15,7 +15,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......
......@@ -6,7 +6,7 @@
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -15,7 +15,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......
......@@ -6,7 +6,7 @@
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -15,7 +15,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......
......@@ -6,7 +6,7 @@
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -15,7 +15,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......
......@@ -31,7 +31,7 @@
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -40,7 +40,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......
......@@ -31,7 +31,7 @@
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -40,7 +40,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......
......@@ -6,7 +6,7 @@
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -15,7 +15,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......
......@@ -6,7 +6,7 @@
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -15,7 +15,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......@@ -39,6 +39,11 @@ 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.
*/
......@@ -58,6 +63,9 @@ void nxagentInitOptions()
nxagentOptions.Height = 0;
nxagentOptions.BorderWidth = 0;
nxagentOptions.WMBorderWidth = -1;
nxagentOptions.WMTitleHeight = -1;
nxagentOptions.SavedX = 0;
nxagentOptions.SavedY = 0;
nxagentOptions.SavedWidth = 0;
......@@ -163,6 +171,9 @@ void nxagentResetOptions()
nxagentOptions.TileWidth = UNDEFINED;
nxagentOptions.TileHeight = UNDEFINED;
nxagentOptions.WMBorderWidth = -1;
nxagentOptions.WMTitleHeight = -1;
}
void nxagentSaveOptions()
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......@@ -29,6 +29,8 @@
#define UNDEFINED -1
#define COPY_UNLIMITED -1
extern unsigned int nxagentPrintGeometryFlags;
typedef enum _BackingStoreMode
{
BackingStoreUndefined = -1,
......@@ -124,6 +126,9 @@ typedef struct _AgentOptions
* screen.
*/
int WMBorderWidth;
int WMTitleHeight;
int SavedX;
int SavedY;
int SavedWidth;
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......@@ -108,6 +108,12 @@ FIXME: The condition checking for the render
avoid problems with the render composi-
te on XFree86 remote server.
*/
/*
FIXME: Changed macro: NXAGENT_SHOULD_DEFER_COMPOSITE
to handle situation, when pSrc -> pDrawable
is NULL. This case happens with gradients
and solid fill.
#define NXAGENT_SHOULD_DEFER_COMPOSITE(pSrc, pMask, pDst) \
((nxagentRenderVersionMajor == 0 && \
nxagentRenderVersionMinor == 8 && \
......@@ -118,6 +124,18 @@ FIXME: The condition checking for the render
nxagentOption(DeferLevel) == 1) || \
(nxagentOption(DeferLevel) >= 2 && \
nxagentOption(LinkType) < LINK_TYPE_ADSL))
*/
#define NXAGENT_SHOULD_DEFER_COMPOSITE(pSrc, pMask, pDst) \
((nxagentRenderVersionMajor == 0 && \
nxagentRenderVersionMinor == 8 && \
(pDst) -> pDrawable -> type == DRAWABLE_PIXMAP) || \
(nxagentOption(DeferLevel) >= 2 && \
nxagentOption(LinkType) < LINK_TYPE_ADSL) || \
(nxagentOption(DeferLevel) == 1 && \
(pDst) -> pDrawable -> type == DRAWABLE_PIXMAP && \
(((pSrc) -> pDrawable && nxagentDrawableStatus((pSrc) -> pDrawable) == NotSynchronized) || \
((pMask) && nxagentDrawableStatus((pMask) -> pDrawable) == NotSynchronized))))
#define NXAGENT_SHOULD_DEFER_PUTIMAGE(pDrawable) \
(nxagentSplitTrap == 0 && \
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......@@ -57,6 +57,13 @@ is" without express or implied warranty.
#undef TEST
#undef DEBUG
/*
* The nxagentReversePointerMap array is used to
* memorize remote display pointer map.
*/
unsigned char nxagentReversePointerMap[MAXBUTTONS];
void nxagentChangePointerControl(DeviceIntPtr pDev, PtrCtrl *ctrl)
{
/*
......@@ -125,6 +132,8 @@ int nxagentPointerProc(DeviceIntPtr pDev, int onoff)
return Success;
}
nxagentInitPointerMap();
nxagentEnablePointerEvents();
break;
......@@ -155,3 +164,28 @@ int nxagentPointerProc(DeviceIntPtr pDev, int onoff)
return Success;
}
void nxagentInitPointerMap(void)
{
int numButtons;
int i;
unsigned char pointerMap[MAXBUTTONS];
#ifdef DEBUG
fprintf(stderr, "nxagentInitPointerMap: Going to retrieve the "
"pointer map from remote display.\n");
#endif
numButtons = XGetPointerMapping(nxagentDisplay, pointerMap, MAXBUTTONS);
/*
* Computing revers pointer map.
*/
for (i = 1; i <= numButtons; i++)
{
nxagentReversePointerMap[pointerMap[i - 1] - 1] = i;
}
}
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......@@ -38,8 +38,17 @@ is" without express or implied warranty.
(ButtonPressMask | ButtonReleaseMask | PointerMotionMask | \
EnterWindowMask | LeaveWindowMask)
/*
* The nxagentReversePointerMap array is used to
* memorize remote display pointer map.
*/
extern unsigned char nxagentReversePointerMap[MAXBUTTONS];
void nxagentChangePointerControl(DeviceIntPtr pDev, PtrCtrl *ctrl);
int nxagentPointerProc(DeviceIntPtr pDev, int onoff);
void nxagentInitPointerMap(void);
#endif /* __Pointer_H__ */
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......@@ -81,6 +81,8 @@ extern Bool nxagentUninstallFontServerPath(void);
extern void nxagentRemoveXConnection(void);
extern void nxagentInitPointerMap(void);
static char *nxagentGetReconnectError(void);
void nxagentInitializeRecLossyLevel(void);
......@@ -257,7 +259,11 @@ 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();
......@@ -580,6 +586,8 @@ Bool nxagentReconnectSession(void)
nxagentOldKeyboard = NULL;
}
nxagentInitPointerMap();
nxagentDeactivatePointerGrab();
nxagentWakeupByReconnect();
......@@ -609,7 +617,11 @@ 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);
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......@@ -105,4 +105,6 @@ void nxagentDisconnectPicture(pointer p0, XID x1, void* p2);
void nxagentReconnectGlyphSet(void* p0, XID x1, void *p2);
void nxagentDestroyPicture(PicturePtr pPicture);
#endif /* __Render_H__ */
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......@@ -60,6 +60,27 @@ 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
......@@ -429,6 +450,7 @@ 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;
......@@ -489,8 +511,22 @@ int nxagentExportProperty(pWin, property, type, format, mode, nUnits, value)
wmHints.flags |= InputHint;
wmHints.input = True;
output = (char*) &wmHints;
export = 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;
if ((wmHints.flags & IconPixmapHint) && (wmHints.icon_pixmap != None))
{
......@@ -504,17 +540,17 @@ int nxagentExportProperty(pWin, property, type, format, mode, nUnits, value)
nxagentSynchronizeRegion((DrawablePtr) icon, NullRegion, NEVER_BREAK, NULL);
}
wmHints.icon_pixmap = nxagentPixmap(icon);
propHints.iconPixmap = nxagentPixmap(icon);
}
else
{
wmHints.flags &= ~IconPixmapHint;
propHints.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
}
}
......@@ -526,17 +562,17 @@ int nxagentExportProperty(pWin, property, type, format, mode, nUnits, value)
if (icon)
{
wmHints.icon_window = nxagentWindow(icon);
propHints.iconWindow = nxagentWindow(icon);
}
else
{
wmHints.flags &= ~IconWindowHint;
propHints.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
}
}
......@@ -548,17 +584,17 @@ int nxagentExportProperty(pWin, property, type, format, mode, nUnits, value)
if (icon)
{
wmHints.icon_mask = nxagentPixmap(icon);
propHints.iconMask = nxagentPixmap(icon);
}
else
{
wmHints.flags &= ~IconMaskHint;
propHints.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
}
}
......@@ -570,17 +606,17 @@ int nxagentExportProperty(pWin, property, type, format, mode, nUnits, value)
if (window)
{
wmHints.window_group = nxagentWindow(window);
propHints.windowGroup = nxagentWindow(window);
}
else
{
wmHints.flags &= ~WindowGroupHint;
propHints.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
}
}
......@@ -590,6 +626,7 @@ int nxagentExportProperty(pWin, property, type, format, mode, nUnits, value)
XlibAtom *atoms = malloc(nUnits * sizeof(*atoms));
Atom *input = value;
int i;
int j = 0;
freeMem = True;
export = True;
......@@ -597,16 +634,40 @@ int nxagentExportProperty(pWin, property, type, format, mode, nUnits, value)
for (i = 0; i < nUnits; i++)
{
atoms[i] = nxagentLocalToRemoteAtom(input[i]);
if (atoms[i] == None)
{
#ifdef WARNING
fprintf(stderr, "nxagentExportProperty: WARNING! Failed to convert local atom %ld [%s].\n",
(long int) input[i], validateString(NameForAtom(input[i])));
#endif
}
/*
* Exporting the _NET_WM_PING property could
* result in rootless windows being grayed out
* when the compiz window manager is running.
*
* Better solution would probably be to handle
* the communication with the window manager
* instead of just getting rid of the property.
*/
if (strcmp(NameForAtom(input[i]), "_NET_WM_PING") != 0)
{
atoms[j] = nxagentLocalToRemoteAtom(input[i]);
if (atoms[j] == None)
{
#ifdef WARNING
fprintf(stderr, "nxagentExportProperty: WARNING! Failed to convert local atom %ld [%s].\n",
(long int) input[i], validateString(NameForAtom(input[i])));
#endif
}
j++;
}
#ifdef TEST
else
{
fprintf(stderr, "nxagentExportProperty: WARNING! "
"Not exporting the _NET_WM_PING property.\n");
}
#endif
}
nUnits = j;
}
else if (strcmp(typeS, "WINDOW") == 0)
{
......
/**************************************************************************/
/* */
/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
......@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
/* NX and NoMachine are trademarks of NoMachine S.r.l. */
/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
......
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