aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2012-05-22 00:49:10 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2012-05-22 00:49:10 +0200
commit222a4a22214608b7f89691eee1c57873c2631705 (patch)
tree0b4a1b5d3483d2ba14a21671d8e5f5c2b3e2245d /nx-X11/programs
parentc29053f82cbea5f2704d99c4d5e8afe0329e5cbe (diff)
downloadnx-libs-222a4a22214608b7f89691eee1c57873c2631705.tar.gz
nx-libs-222a4a22214608b7f89691eee1c57873c2631705.tar.bz2
nx-libs-222a4a22214608b7f89691eee1c57873c2631705.zip
Imported nxagent-3.5.0-9.tar.gznxagent
Summary: Imported nxagent-3.5.0-9.tar.gz Keywords: Imported nxagent-3.5.0-9.tar.gz into Git repository
Diffstat (limited to 'nx-X11/programs')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Args.c18
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/CHANGELOG19
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Client.c21
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Client.h3
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Cursor.c17
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Cursor.h3
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Display.c31
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Display.h2
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Drawable.c33
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Handlers.c4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Init.c18
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Options.c4
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Options.h12
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Pixels.h2
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Reconnect.c5
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Render.c20
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Screen.c3
17 files changed, 192 insertions, 23 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Args.c b/nx-X11/programs/Xserver/hw/nxagent/Args.c
index ecf0a21af..ecf04e226 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Args.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Args.c
@@ -514,6 +514,22 @@ int ddxProcessArgument(int argc, char *argv[], int i)
return 0;
}
+ if (!strcmp(argv[i], "-irlimit"))
+ {
+ int limit;
+
+ if (++i < argc &&
+ sscanf(argv[i], "%i", &limit) == 1)
+ {
+ nxagentChangeOption(ImageRateLimit, limit);
+
+
+ return 2;
+ }
+
+ return 0;
+ }
+
if (!strcmp(argv[i], "-tile"))
{
int width;
@@ -780,6 +796,8 @@ int ddxProcessArgument(int argc, char *argv[], int i)
{
nxagentChangeOption(DeviceControl, True);
+ nxagentChangeOption(DeviceControlUserDefined , True);
+
return 1;
}
diff --git a/nx-X11/programs/Xserver/hw/nxagent/CHANGELOG b/nx-X11/programs/Xserver/hw/nxagent/CHANGELOG
index 763f066ad..0a82773f4 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/CHANGELOG
+++ b/nx-X11/programs/Xserver/hw/nxagent/CHANGELOG
@@ -1,5 +1,24 @@
ChangeLog:
+nxagent-3.5.0-9
+
+- Fixed an issue with cursor position set in XTest extension.
+
+nxagent-3.5.0-8
+
+- Fixed TR01J02646. Performance issues with cairo version 1.12.
+
+- Fixed TR01J02667. Changes to mouse sensitivity couldn't be forwarded
+ to NX client host although -noignore was among extra options.
+
+- Fixed TR05J02705. Agent ignore WarpPointer requests.
+
+- Fixed TR05J02706. Suspended sessions could not be recovered using
+ a client form a different version.
+
+- Fixed TR05J02703. Agent failed because of missing checks on source
+ drawables in the render code.
+
nxagent-3.5.0-7
- Fixed TR10I02622. Corrected function searching for icon file.
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Client.c b/nx-X11/programs/Xserver/hw/nxagent/Client.c
index 63ed0e134..cba47981d 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Client.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Client.c
@@ -124,13 +124,24 @@ void nxagentGuessClientHint(ClientPtr client, Atom property, char *data)
if (nxagentClientPriv(client) -> clientHint == UNKNOWN)
{
- if (property == XA_WM_CLASS && strcmp(data, "nxclient") == 0)
+ if (property == XA_WM_CLASS)
{
- #ifdef TEST
- fprintf(stderr, "++++++nxagentGuessClientHint: Detected nxclient as [%d].\n", client -> index);
- #endif
+ if (strcmp(data, "nxclient") == 0)
+ {
+ #ifdef TEST
+ fprintf(stderr, "++++++nxagentGuessClientHint: Detected nxclient as [%d].\n", client -> index);
+ #endif
- nxagentClientHint(client) = NXCLIENT_WINDOW;
+ nxagentClientHint(client) = NXCLIENT_WINDOW;
+ }
+ else if (strstr(data, "java"))
+ {
+ #ifdef TEST
+ fprintf(stderr, "++++++nxagentGuessClientHint: Detected java as [%d].\n", client -> index);
+ #endif
+
+ nxagentClientHint(client) = JAVA_WINDOW;
+ }
}
}
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Client.h b/nx-X11/programs/Xserver/hw/nxagent/Client.h
index a9b06c845..67ec50e79 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Client.h
+++ b/nx-X11/programs/Xserver/hw/nxagent/Client.h
@@ -32,7 +32,8 @@ enum ClientHint
UNKNOWN = 0,
NXCLIENT_WINDOW,
NXCLIENT_DIALOG,
- NXAGENT_SHADOW
+ NXAGENT_SHADOW,
+ JAVA_WINDOW
};
typedef struct _PrivClientRec
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Cursor.c b/nx-X11/programs/Xserver/hw/nxagent/Cursor.c
index e27415b91..9d48aa134 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Cursor.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Cursor.c
@@ -290,10 +290,25 @@ void nxagentRecolorCursor(ScreenPtr pScreen, CursorPtr pCursor,
&fg_color, &bg_color);
}
+Bool (*nxagentSetCursorPositionW)(ScreenPtr pScreen, int x, int y,
+ Bool generateEvent);
+
Bool nxagentSetCursorPosition(ScreenPtr pScreen, int x, int y,
Bool generateEvent)
{
- return 1;
+ if (generateEvent != 0)
+ {
+ return (*nxagentSetCursorPositionW)(pScreen, x, y, generateEvent);
+ }
+ else
+ {
+ /*
+ * Calling miSetCursorPosition with generateEvent == 0
+ * causes a crash in miPoiterUpdate().
+ */
+
+ return 1;
+ }
}
void nxagentReconnectCursor(pointer p0, XID x1, pointer p2)
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Cursor.h b/nx-X11/programs/Xserver/hw/nxagent/Cursor.h
index df7dc44f7..88dea2686 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Cursor.h
+++ b/nx-X11/programs/Xserver/hw/nxagent/Cursor.h
@@ -97,6 +97,9 @@ void nxagentRecolorCursor(ScreenPtr pScreen, CursorPtr pCursor,
Bool nxagentSetCursorPosition(ScreenPtr pScreen, int x, int y,
Bool generateEvent);
+extern Bool (*nxagentSetCursorPositionW)(ScreenPtr pScreen, int x, int y,
+ Bool generateEvent);
+
void nxagentDisconnectCursor(pointer p0, XID x1, pointer p2);
void nxagentReconnectCursor(pointer p0, XID x1, pointer p2);
void nxagentReDisplayCurrentCursor(void);
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Display.c b/nx-X11/programs/Xserver/hw/nxagent/Display.c
index c60718d36..9031c25c7 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Display.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Display.c
@@ -746,8 +746,19 @@ static void nxagentDisplayWriteHandler(Display *display, int length)
}
}
+static CARD32 nxagentRateTime = 5000;
+static CARD32 nxagentLastTime;
+static unsigned int nxagentRate = 0;
+
+int nxagentGetDataRate(void)
+{
+ return nxagentRate;
+}
+
static void nxagentDisplayFlushHandler(Display *display, int length)
{
+ CARD32 time;
+
if (nxagentDisplay != NULL)
{
#ifdef TEST
@@ -765,6 +776,22 @@ static void nxagentDisplayFlushHandler(Display *display, int length)
if (nxagentOption(LinkType) != LINK_TYPE_NONE)
{
nxagentFlush = GetTimeInMillis();
+
+ time = nxagentFlush;
+
+ time = time - nxagentLastTime;
+
+ if (time < nxagentRateTime)
+ {
+ nxagentRate = ((nxagentRate * (nxagentRateTime - time) +
+ length) * 1000) / nxagentRateTime;
+ }
+ else
+ {
+ nxagentRate = (length * 1000) / nxagentRateTime;
+ }
+
+ nxagentLastTime = nxagentFlush;
}
}
}
@@ -1482,10 +1509,6 @@ void nxagentSetDefaultVisual(void)
int i;
- nxagentDefaultVisualIndex = 3;
-
- return;
-
if (nxagentUserDefaultClass || nxagentUserDefaultDepth)
{
nxagentDefaultVisualIndex = UNDEFINED;
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Display.h b/nx-X11/programs/Xserver/hw/nxagent/Display.h
index 454150d6e..1c12d6cea 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Display.h
+++ b/nx-X11/programs/Xserver/hw/nxagent/Display.h
@@ -159,6 +159,8 @@ extern int nxagentShadowXConnectionNumber;
int nxagentServerOrder(void);
+int nxagentGetDataRate(void);
+
#define nxagentClientOrder(client) \
((client)->swapped ? !nxagentServerOrder() : nxagentServerOrder())
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Drawable.c b/nx-X11/programs/Xserver/hw/nxagent/Drawable.c
index 9c167743f..f2225996b 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Drawable.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Drawable.c
@@ -112,6 +112,27 @@ unsigned long nxagentGetColor(DrawablePtr pDrawable, int xPixel, int yPixel);
unsigned long nxagentGetDrawableColor(DrawablePtr pDrawable);
unsigned long nxagentGetRegionColor(DrawablePtr pDrawable, RegionPtr pRegion);
+int nxagentSkipImage = 0;
+
+static int nxagentTooManyImageData(void)
+{
+ unsigned int r;
+ unsigned int limit;
+
+ limit = nxagentOption(ImageRateLimit);
+
+ r = nxagentGetDataRate() / 1000;
+
+ #ifdef TEST
+ if (r > limit)
+ {
+ fprintf(stderr, "Warning: Current bit rate is: %u kB/s.\n", r);
+ }
+ #endif
+
+ return (r > limit);
+}
+
int nxagentSynchronizeDrawable(DrawablePtr pDrawable, int wait, unsigned int breakMask, WindowPtr owner)
{
int result;
@@ -1304,6 +1325,18 @@ FIXME: All drawables should be set as synchronized and
never marked as corrupted while the display is
down.
*/
+
+ nxagentSkipImage = nxagentTooManyImageData();
+
+ if (nxagentOption(ImageRateLimit) && nxagentSkipImage)
+ {
+ #ifdef TEST
+ fprintf(stderr, "nxagentSynchronizeDrawable: Skipping due to bit rate limit reached.\n");
+ #endif
+
+ return;
+ }
+
if (NXDisplayError(nxagentDisplay) == 1)
{
#ifdef TEST
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Handlers.c b/nx-X11/programs/Xserver/hw/nxagent/Handlers.c
index 310b572cc..332816fe0 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Handlers.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Handlers.c
@@ -159,6 +159,8 @@ struct _DispatchRec nxagentDispatch = { UNDEFINED, 0, 0, 0 };
* for our clients or the X server.
*/
+extern int nxagentSkipImage;
+
void nxagentBlockHandler(pointer data, struct timeval **timeout, pointer mask)
{
/*
@@ -357,7 +359,7 @@ void nxagentBlockHandler(pointer data, struct timeval **timeout, pointer mask)
nxagentCorruptedBackgrounds > 0 ||
nxagentCorruptedPixmaps > 0));
- if (synchronize == 1)
+ if (nxagentSkipImage == 0 && synchronize == 1)
{
#ifdef TEST
fprintf(stderr, "nxagentBlockHandler: Setting a zero timeout with [%d][%d][%d] and "
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Init.c b/nx-X11/programs/Xserver/hw/nxagent/Init.c
index f4fc3c7e5..a50e8a5fc 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Init.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Init.c
@@ -120,6 +120,8 @@ extern int OsVendorVErrorFFatal;
extern void (*OsVendorStartRedirectErrorFProc)();
extern void (*OsVendorEndRedirectErrorFProc)();
+extern void SetVendorRelease(int release);
+
void OsVendorStartRedirectErrorFFunction();
void OsVendorEndRedirectErrorFFunction();
@@ -206,6 +208,22 @@ void InitOutput(ScreenInfo *screenInfo, int argc, char *argv[])
}
/*
+ * Avoid slowness due to buggy_repeat workaround
+ * in libcairo versions >= 1.10.
+ */
+
+ SetVendorRelease(70000000);
+
+ /*
+ * Init the time count for image rate.
+ */
+
+ if (nxagentOption(ImageRateLimit) != 0)
+ {
+ fprintf(stderr, "Info: Image rate limit set to %u kB/s.\n", nxagentOption(ImageRateLimit));
+ }
+
+ /*
* Unset the LD_LIBRARY_PATH variable in
* Popen() before calling execl() in the
* child process.
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Options.c b/nx-X11/programs/Xserver/hw/nxagent/Options.c
index 5d7855667..ca5be0b5f 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Options.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Options.c
@@ -85,6 +85,8 @@ void nxagentInitOptions()
nxagentOptions.DeviceControl = 0;
+ nxagentOptions.DeviceControlUserDefined = 0;
+
nxagentOptions.ResetKeyboardAtResume = 1;
nxagentOptions.Reset = 0;
@@ -149,6 +151,8 @@ void nxagentInitOptions()
nxagentOptions.InhibitXkb = 1;
nxagentOptions.CopyBufferSize = COPY_UNLIMITED;
+
+ nxagentOptions.ImageRateLimit = 0;
}
/*
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Options.h b/nx-X11/programs/Xserver/hw/nxagent/Options.h
index 7850a0586..40cb1790e 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Options.h
+++ b/nx-X11/programs/Xserver/hw/nxagent/Options.h
@@ -184,6 +184,12 @@ typedef struct _AgentOptions
int DeviceControl;
/*
+ * Explicitly asked config propagation.
+ */
+
+ int DeviceControlUserDefined;
+
+ /*
* Resuming keyboard device corrects keymap if session
* migrates across platforms with different keycode
* layout.
@@ -369,6 +375,12 @@ typedef struct _AgentOptions
int CopyBufferSize;
+ /*
+ * Max image data rate to the encoder input.
+ */
+
+ int ImageRateLimit;
+
} AgentOptionsRec;
typedef AgentOptionsRec *AgentOptionsPtr;
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Pixels.h b/nx-X11/programs/Xserver/hw/nxagent/Pixels.h
index 918d74dc7..4a02d80e5 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Pixels.h
+++ b/nx-X11/programs/Xserver/hw/nxagent/Pixels.h
@@ -134,7 +134,7 @@ FIXME: Changed macro: NXAGENT_SHOULD_DEFER_COMPOSITE
(nxagentOption(DeferLevel) == 1 && \
(pDst) -> pDrawable -> type == DRAWABLE_PIXMAP && \
(((pSrc) -> pDrawable && nxagentDrawableStatus((pSrc) -> pDrawable) == NotSynchronized) || \
- ((pMask) && nxagentDrawableStatus((pMask) -> pDrawable) == NotSynchronized))))
+ ((pMask) && (pMask) -> pDrawable && nxagentDrawableStatus((pMask) -> pDrawable) == NotSynchronized))))
#define NXAGENT_SHOULD_DEFER_PUTIMAGE(pDrawable) \
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c b/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c
index 90b80799c..3c576c6e0 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c
@@ -377,11 +377,10 @@ Bool nxagentReconnectSession(void)
nxagentResizeDesktopAtStartup = False;
/*
- * The default is device settings have
- * not to be propagated to the X server.
+ * Propagate device settings if explicitly asked for.
*/
- nxagentChangeOption(DeviceControl, False);
+ nxagentChangeOption(DeviceControl, nxagentOption(DeviceControlUserDefined));
/*
* We need to zero out every new XID
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Render.c b/nx-X11/programs/Xserver/hw/nxagent/Render.c
index 6c74c147f..29bffaa35 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Render.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Render.c
@@ -1095,8 +1095,9 @@ void nxagentComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pD
}
}
- if (pMask != NULL && pMask -> pDrawable != pSrc -> pDrawable &&
- pMask -> pDrawable != pDst -> pDrawable)
+ if (pMask != NULL && pMask -> pDrawable != NULL &&
+ pMask -> pDrawable != pSrc -> pDrawable &&
+ pMask -> pDrawable != pDst -> pDrawable)
{
nxagentSynchronizeShmPixmap(pMask -> pDrawable, xMask, yMask, width, height);
@@ -1259,7 +1260,8 @@ void nxagentGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst,
* on the real X server.
*/
- if (nxagentDrawableStatus(pSrc -> pDrawable) == NotSynchronized)
+ if (pSrc -> pDrawable != NULL &&
+ nxagentDrawableStatus(pSrc -> pDrawable) == NotSynchronized)
{
#ifdef TEST
fprintf(stderr, "nxagentGlyphs: Synchronizing source [%s] at [%p].\n",
@@ -1749,7 +1751,8 @@ FIXME: Is this useful or just a waste of bandwidth?
return;
}
- if (nxagentDrawableStatus(pSrc -> pDrawable) == NotSynchronized)
+ if (pSrc -> pDrawable != NULL &&
+ nxagentDrawableStatus(pSrc -> pDrawable) == NotSynchronized)
{
#ifdef TEST
fprintf(stderr, "nxagentTrapezoids: Going to synchronize the source drawable at [%p].\n",
@@ -1843,7 +1846,8 @@ void nxagentTriangles(CARD8 op, PicturePtr pSrc, PicturePtr pDst,
* operation like nxagentTrapezoids() does.
*/
- if (nxagentDrawableStatus(pSrc -> pDrawable) == NotSynchronized)
+ if (pSrc -> pDrawable != NULL &&
+ nxagentDrawableStatus(pSrc -> pDrawable) == NotSynchronized)
{
#ifdef TEST
fprintf(stderr, "nxagentTriangles: Going to synchronize the source drawable at [%p].\n",
@@ -1920,7 +1924,8 @@ void nxagentTriStrip(CARD8 op, PicturePtr pSrc, PicturePtr pDst,
* operation like nxagentTrapezoids() does.
*/
- if (nxagentDrawableStatus(pSrc -> pDrawable) == NotSynchronized)
+ if (pSrc -> pDrawable != NULL &&
+ nxagentDrawableStatus(pSrc -> pDrawable) == NotSynchronized)
{
#ifdef TEST
fprintf(stderr, "nxagentTriStrip: Going to synchronize the source drawable at [%p].\n",
@@ -1997,7 +2002,8 @@ void nxagentTriFan(CARD8 op, PicturePtr pSrc, PicturePtr pDst,
* operation like nxagentTrapezoids() does.
*/
- if (nxagentDrawableStatus(pSrc -> pDrawable) == NotSynchronized)
+ if (pSrc -> pDrawable != NULL &&
+ nxagentDrawableStatus(pSrc -> pDrawable) == NotSynchronized)
{
#ifdef TEST
fprintf(stderr, "nxagentTriFan: Going to synchronize the source drawable at [%p].\n",
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Screen.c b/nx-X11/programs/Xserver/hw/nxagent/Screen.c
index de688a0db..9957a7dfd 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Screen.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Screen.c
@@ -1644,6 +1644,9 @@ N/A
pScreen->RealizeCursor = nxagentRealizeCursor;
pScreen->UnrealizeCursor = nxagentUnrealizeCursor;
pScreen->RecolorCursor = nxagentRecolorCursor;
+
+ nxagentSetCursorPositionW = pScreen->SetCursorPosition;
+
pScreen->SetCursorPosition = nxagentSetCursorPosition;
#define POSITION_OFFSET (pScreen->myNum * (nxagentOption(Width) + \