aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/hw/nxagent/Image.c
diff options
context:
space:
mode:
authorMihai Moldovan <ïonic@ionic.de>2016-06-17 01:45:40 +0000
committerMihai Moldovan <ïonic@ionic.de>2016-06-17 21:13:20 +0000
commit6051dec4a1ae6decd9123a3310098baf43f45c49 (patch)
treebc82daeb0090eea8dc7eb977cc82a3ed47284262 /nx-X11/programs/Xserver/hw/nxagent/Image.c
parent3dea5a88cad4ee51b2240bb95693ccb4c43047b5 (diff)
downloadnx-libs-6051dec4a1ae6decd9123a3310098baf43f45c49.tar.gz
nx-libs-6051dec4a1ae6decd9123a3310098baf43f45c49.tar.bz2
nx-libs-6051dec4a1ae6decd9123a3310098baf43f45c49.zip
{nx-X11/programs/Xserver/hw/nxagent/{{Args,Handlers,Image,Options}.c,Options.h},nxcomp/{Loop,Misc}.cpp}: add configurable sleep delay if session is suspended.
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent/Image.c')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Image.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Image.c b/nx-X11/programs/Xserver/hw/nxagent/Image.c
index 6a7d46c35..a158a11db 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Image.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Image.c
@@ -69,15 +69,6 @@
#define IMAGE_UNIQUE_RATIO 10
/*
- * Introduce a small delay after each image
- * operation if the session is down. Value
- * is in microseconds and is multiplied by
- * the image data size in kilobytes.
- */
-
-#define IMAGE_DELAY_IF_DOWN 250
-
-/*
* Preferred pack and split parameters we
* got from the NX transport.
*/
@@ -521,11 +512,12 @@ void nxagentPutImage(DrawablePtr pDrawable, GCPtr pGC, int depth,
length = nxagentImageLength(dstWidth, dstHeight, format, leftPad, depth);
if (nxagentShadowCounter == 0 &&
- NXDisplayError(nxagentDisplay) == 1)
+ NXDisplayError(nxagentDisplay) == 1 &&
+ nxagentOption(SleepTime) > 0)
{
int us;
- us = IMAGE_DELAY_IF_DOWN * (length / 1024);
+ us = nxagentOption(SleepTime) * 4 * (length / 1024);
us = (us < 10000 ? 10000 : (us > 1000000 ? 1000000 : us));