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
0fb6af25
Commit
0fb6af25
authored
Oct 28, 2019
by
Ulrich Sibiller
Committed by
Mike Gabriel
Nov 02, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
NXdispatch.c: mark NX changes
parent
c61ac23f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
17 deletions
+47
-17
NXdispatch.c
nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c
+47
-17
No files found.
nx-X11/programs/Xserver/hw/nxagent/NXdispatch.c
View file @
0fb6af25
...
...
@@ -629,12 +629,17 @@ ProcQueryTree(register ClientPtr client)
reply
.
parent
=
(
Window
)
None
;
pHead
=
RealChildHead
(
pWin
);
for
(
pChild
=
pWin
->
lastChild
;
pChild
!=
pHead
;
pChild
=
pChild
->
prevSib
)
#ifdef NXAGENT_SERVER
{
if
(
!
IsViewportFrame
(
pChild
))
{
numChildren
++
;
}
if
(
!
IsViewportFrame
(
pChild
))
{
numChildren
++
;
}
}
#else
numChildren
++
;
#endif
if
(
numChildren
)
{
int
curChild
=
0
;
...
...
@@ -643,12 +648,16 @@ ProcQueryTree(register ClientPtr client)
if
(
!
childIDs
)
return
BadAlloc
;
for
(
pChild
=
pWin
->
lastChild
;
pChild
!=
pHead
;
pChild
=
pChild
->
prevSib
)
{
if
(
!
IsViewportFrame
(
pChild
))
{
childIDs
[
curChild
++
]
=
pChild
->
drawable
.
id
;
}
#ifdef NXAGENT_SERVER
{
if
(
!
IsViewportFrame
(
pChild
))
{
childIDs
[
curChild
++
]
=
pChild
->
drawable
.
id
;
}
}
#else
childIDs
[
curChild
++
]
=
pChild
->
drawable
.
id
;
#endif
}
reply
.
nChildren
=
numChildren
;
...
...
@@ -707,8 +716,12 @@ ProcConvertSelection(register ClientPtr client)
i
=
0
;
while
((
i
<
NumCurrentSelections
)
&&
CurrentSelections
[
i
].
selection
!=
stuff
->
selection
)
i
++
;
if
((
i
<
NumCurrentSelections
)
&&
if
((
i
<
NumCurrentSelections
)
&&
#ifdef NXAGENT_SERVER
(
CurrentSelections
[
i
].
window
!=
None
)
&&
(
CurrentSelections
[
i
].
client
!=
NullClient
)
#else
(
CurrentSelections
[
i
].
window
!=
None
))
#endif
#ifdef XCSECURITY
&&
(
!
client
->
CheckAccess
||
(
*
client
->
CheckAccess
)(
client
,
CurrentSelections
[
i
].
window
,
...
...
@@ -716,7 +729,6 @@ ProcConvertSelection(register ClientPtr client)
CurrentSelections
[
i
].
pWin
))
#endif
)
{
memset
(
&
event
,
0
,
sizeof
(
xEvent
));
event
.
u
.
u
.
type
=
SelectionRequest
;
...
...
@@ -755,13 +767,14 @@ int
ProcOpenFont
(
register
ClientPtr
client
)
{
int
err
;
char
fontReq
[
256
];
REQUEST
(
xOpenFontReq
);
REQUEST_FIXED_SIZE
(
xOpenFontReq
,
stuff
->
nbytes
);
client
->
errorValue
=
stuff
->
fid
;
LEGAL_NEW_RESOURCE
(
stuff
->
fid
,
client
);
#ifdef NXAGENT_SERVER
char
fontReq
[
256
];
memcpy
(
fontReq
,(
char
*
)
&
stuff
[
1
],(
stuff
->
nbytes
<
256
)
?
stuff
->
nbytes
:
255
);
fontReq
[
stuff
->
nbytes
]
=
0
;
if
(
strchr
(
fontReq
,
'*'
)
||
strchr
(
fontReq
,
'?'
))
...
...
@@ -774,6 +787,7 @@ ProcOpenFont(register ClientPtr client)
stuff
->
nbytes
,
(
char
*
)
&
stuff
[
1
]);
}
else
#endif
err
=
OpenFont
(
client
,
stuff
->
fid
,
(
Mask
)
0
,
stuff
->
nbytes
,
(
char
*
)
&
stuff
[
1
]);
if
(
err
==
Success
)
...
...
@@ -844,11 +858,12 @@ ProcCloseFont(register ClientPtr client)
int
ProcListFonts
(
register
ClientPtr
client
)
{
char
tmp
[
256
];
REQUEST
(
xListFontsReq
);
REQUEST_FIXED_SIZE
(
xListFontsReq
,
stuff
->
nbytes
);
#ifdef NXAGENT_SERVER
char
tmp
[
256
];
memcpy
(
tmp
,(
unsigned
char
*
)
&
stuff
[
1
],(
stuff
->
nbytes
<
256
)
?
stuff
->
nbytes
:
255
);
tmp
[
stuff
->
nbytes
]
=
0
;
...
...
@@ -856,6 +871,8 @@ ProcListFonts(register ClientPtr client)
fprintf
(
stderr
,
"Dispatch: ListFont request with pattern %s max_names=%d
\n
"
,
tmp
,
stuff
->
maxNames
);
#endif
nxagentListRemoteFonts
(
tmp
,
stuff
->
maxNames
<
nxagentMaxFontNames
?
nxagentMaxFontNames
:
stuff
->
maxNames
);
#endif
return
ListFonts
(
client
,
(
unsigned
char
*
)
&
stuff
[
1
],
stuff
->
nbytes
,
stuff
->
maxNames
);
}
...
...
@@ -863,23 +880,24 @@ ProcListFonts(register ClientPtr client)
int
ProcListFontsWithInfo
(
register
ClientPtr
client
)
{
char
tmp
[
256
];
REQUEST
(
xListFontsWithInfoReq
);
REQUEST_FIXED_SIZE
(
xListFontsWithInfoReq
,
stuff
->
nbytes
);
#ifdef NXAGENT_SERVER
char
tmp
[
256
];
memcpy
(
tmp
,(
unsigned
char
*
)
&
stuff
[
1
],(
stuff
->
nbytes
<
256
)
?
stuff
->
nbytes
:
255
);
tmp
[
stuff
->
nbytes
]
=
0
;
#ifdef NXAGENT_FONTMATCH_DEBUG
fprintf
(
stderr
,
"Dispatch: ListFont with info request with pattern %s max_names=%d
\n
"
,
tmp
,
stuff
->
maxNames
);
#endif
nxagentListRemoteFonts
(
tmp
,
stuff
->
maxNames
<
nxagentMaxFontNames
?
nxagentMaxFontNames
:
stuff
->
maxNames
);
#endif
return
StartListFontsWithInfo
(
client
,
stuff
->
nbytes
,
(
unsigned
char
*
)
&
stuff
[
1
],
stuff
->
maxNames
);
}
int
ProcFreePixmap
(
register
ClientPtr
client
)
{
...
...
@@ -971,6 +989,7 @@ ProcSetScreenSaver (register ClientPtr client)
return
BadValue
;
}
#ifdef NXAGENT_SERVER
/*
* The NX agent uses the screen saver procedure
* to monitor the user activities and launch its
...
...
@@ -985,6 +1004,7 @@ ProcSetScreenSaver (register ClientPtr client)
if
(
nxagentOption
(
Timeout
)
==
0
)
{
#endif
if
(
blankingOption
==
DefaultBlanking
)
{
ScreenSaverBlanking
=
defaultScreenSaverBlanking
;
...
...
@@ -1022,7 +1042,9 @@ ProcSetScreenSaver (register ClientPtr client)
}
SetScreenSaverTimer
();
#ifdef NXAGENT_SERVER
}
#ifdef TEST
else
...
...
@@ -1032,7 +1054,7 @@ ProcSetScreenSaver (register ClientPtr client)
}
#endif
#endif
return
(
client
->
noClientException
);
}
...
...
@@ -1050,6 +1072,7 @@ int ProcForceScreenSaver(register ClientPtr client)
return
BadValue
;
}
#ifdef NXAGENT_SERVER
/*
* The NX agent uses the screen saver procedure
* to monitor the user activities and launch its
...
...
@@ -1060,7 +1083,9 @@ int ProcForceScreenSaver(register ClientPtr client)
if
(
nxagentOption
(
Timeout
)
==
0
)
{
#endif
SaveScreens
(
SCREEN_SAVER_FORCER
,
(
int
)
stuff
->
mode
);
#ifdef NXAGENT_SERVER
}
#ifdef TEST
...
...
@@ -1072,6 +1097,7 @@ int ProcForceScreenSaver(register ClientPtr client)
}
#endif
#endif
return
client
->
noClientException
;
}
...
...
@@ -1087,6 +1113,7 @@ int ProcForceScreenSaver(register ClientPtr client)
void
CloseDownClient
(
register
ClientPtr
client
)
{
#ifdef NXAGENT_SERVER
/*
* There must be a better way to hook a
* call-back function to be called any
...
...
@@ -1108,6 +1135,7 @@ CloseDownClient(register ClientPtr client)
*/
nxagentCheckIfShadowAgent
(
client
);
#endif
xorg_CloseDownClient
(
client
);
}
...
...
@@ -1117,6 +1145,7 @@ InitClientPrivates(ClientPtr client)
{
int
ret
=
xorg_InitClientPrivates
(
client
);
#ifdef NXAGENT_SERVER
if
(
ret
==
1
)
{
...
...
@@ -1126,6 +1155,7 @@ InitClientPrivates(ClientPtr client)
nxagentInitClientPrivates
(
client
);
}
#endif
return
ret
;
}
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