Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nx-libs
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dimbor
nx-libs
Commits
222a4a22
Commit
222a4a22
authored
May 22, 2012
by
Mike Gabriel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Imported nxagent-3.5.0-9.tar.gz
Summary: Imported nxagent-3.5.0-9.tar.gz Keywords: Imported nxagent-3.5.0-9.tar.gz into Git repository
parent
c29053f8
Show whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
186 additions
and
17 deletions
+186
-17
Args.c
nx-X11/programs/Xserver/hw/nxagent/Args.c
+18
-0
CHANGELOG
nx-X11/programs/Xserver/hw/nxagent/CHANGELOG
+19
-0
Client.c
nx-X11/programs/Xserver/hw/nxagent/Client.c
+12
-1
Client.h
nx-X11/programs/Xserver/hw/nxagent/Client.h
+2
-1
Cursor.c
nx-X11/programs/Xserver/hw/nxagent/Cursor.c
+15
-0
Cursor.h
nx-X11/programs/Xserver/hw/nxagent/Cursor.h
+3
-0
Display.c
nx-X11/programs/Xserver/hw/nxagent/Display.c
+27
-4
Display.h
nx-X11/programs/Xserver/hw/nxagent/Display.h
+2
-0
Drawable.c
nx-X11/programs/Xserver/hw/nxagent/Drawable.c
+33
-0
Handlers.c
nx-X11/programs/Xserver/hw/nxagent/Handlers.c
+3
-1
Init.c
nx-X11/programs/Xserver/hw/nxagent/Init.c
+18
-0
Options.c
nx-X11/programs/Xserver/hw/nxagent/Options.c
+4
-0
Options.h
nx-X11/programs/Xserver/hw/nxagent/Options.h
+12
-0
Pixels.h
nx-X11/programs/Xserver/hw/nxagent/Pixels.h
+1
-1
Reconnect.c
nx-X11/programs/Xserver/hw/nxagent/Reconnect.c
+2
-3
Render.c
nx-X11/programs/Xserver/hw/nxagent/Render.c
+12
-6
Screen.c
nx-X11/programs/Xserver/hw/nxagent/Screen.c
+3
-0
No files found.
nx-X11/programs/Xserver/hw/nxagent/Args.c
View file @
222a4a22
...
...
@@ -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
;
}
...
...
nx-X11/programs/Xserver/hw/nxagent/CHANGELOG
View file @
222a4a22
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.
...
...
nx-X11/programs/Xserver/hw/nxagent/Client.c
View file @
222a4a22
...
...
@@ -124,7 +124,9 @@ 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
)
{
if
(
strcmp
(
data
,
"nxclient"
)
==
0
)
{
#ifdef TEST
fprintf
(
stderr
,
"++++++nxagentGuessClientHint: Detected nxclient as [%d].
\n
"
,
client
->
index
);
...
...
@@ -132,6 +134,15 @@ void nxagentGuessClientHint(ClientPtr client, Atom property, char *data)
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
;
}
}
}
if
(
nxagentClientPriv
(
client
)
->
clientHint
==
NXCLIENT_WINDOW
)
...
...
nx-X11/programs/Xserver/hw/nxagent/Client.h
View file @
222a4a22
...
...
@@ -32,7 +32,8 @@ enum ClientHint
UNKNOWN
=
0
,
NXCLIENT_WINDOW
,
NXCLIENT_DIALOG
,
NXAGENT_SHADOW
NXAGENT_SHADOW
,
JAVA_WINDOW
};
typedef
struct
_PrivClientRec
...
...
nx-X11/programs/Xserver/hw/nxagent/Cursor.c
View file @
222a4a22
...
...
@@ -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
)
{
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
)
...
...
nx-X11/programs/Xserver/hw/nxagent/Cursor.h
View file @
222a4a22
...
...
@@ -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
);
...
...
nx-X11/programs/Xserver/hw/nxagent/Display.c
View file @
222a4a22
...
...
@@ -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
;
...
...
nx-X11/programs/Xserver/hw/nxagent/Display.h
View file @
222a4a22
...
...
@@ -159,6 +159,8 @@ extern int nxagentShadowXConnectionNumber;
int
nxagentServerOrder
(
void
);
int
nxagentGetDataRate
(
void
);
#define nxagentClientOrder(client) \
((client)->swapped ? !nxagentServerOrder() : nxagentServerOrder())
...
...
nx-X11/programs/Xserver/hw/nxagent/Drawable.c
View file @
222a4a22
...
...
@@ -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
...
...
nx-X11/programs/Xserver/hw/nxagent/Handlers.c
View file @
222a4a22
...
...
@@ -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 "
...
...
nx-X11/programs/Xserver/hw/nxagent/Init.c
View file @
222a4a22
...
...
@@ -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.
...
...
nx-X11/programs/Xserver/hw/nxagent/Options.c
View file @
222a4a22
...
...
@@ -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
;
}
/*
...
...
nx-X11/programs/Xserver/hw/nxagent/Options.h
View file @
222a4a22
...
...
@@ -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
;
...
...
nx-X11/programs/Xserver/hw/nxagent/Pixels.h
View file @
222a4a22
...
...
@@ -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) \
...
...
nx-X11/programs/Xserver/hw/nxagent/Reconnect.c
View file @
222a4a22
...
...
@@ -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
...
...
nx-X11/programs/Xserver/hw/nxagent/Render.c
View file @
222a4a22
...
...
@@ -1095,7 +1095,8 @@ void nxagentComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pD
}
}
if
(
pMask
!=
NULL
&&
pMask
->
pDrawable
!=
pSrc
->
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
"
,
...
...
nx-X11/programs/Xserver/hw/nxagent/Screen.c
View file @
222a4a22
...
...
@@ -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) + \
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment