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
b8b1edb2
Commit
b8b1edb2
authored
Jan 30, 2021
by
Ulrich Sibiller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
NXproperty.c: GetWindowProperty(): add more comments, restruct prototype
parent
8b2b4111
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
20 deletions
+15
-20
NXproperty.c
nx-X11/programs/Xserver/hw/nxagent/NXproperty.c
+15
-20
No files found.
nx-X11/programs/Xserver/hw/nxagent/NXproperty.c
View file @
b8b1edb2
...
...
@@ -446,25 +446,20 @@ ProcGetProperty(ClientPtr client)
return
(
client
->
noClientException
);
}
#ifdef NXAGENT_CLIPBOARD
/* GetWindowProperty clipboard use only */
/* FIXME: that's wrong, it is also called in Window.c and Events.c */
/* FIXME: should be moved to a different file, is not derived from
dix */
/*
* GetWindowProperty is the internal implementation of the
* XGetWindowProperty() Xlib call. It is called from
* Clipboard.c, Window.c and Events.c
*
* FIXME: should be moved to a different file, is not derived from
* dix
*/
int
GetWindowProperty
(
pWin
,
property
,
longOffset
,
longLength
,
delete
,
type
,
actualType
,
format
,
nItems
,
bytesAfter
,
propData
)
WindowPtr
pWin
;
Atom
property
;
long
longOffset
;
long
longLength
;
Bool
delete
;
Atom
type
;
Atom
*
actualType
;
int
*
format
;
unsigned
long
*
nItems
;
unsigned
long
*
bytesAfter
;
unsigned
char
**
propData
;
GetWindowProperty
(
WindowPtr
pWin
,
Atom
property
,
long
longOffset
,
long
longLength
,
Bool
delete
,
Atom
type
,
Atom
*
actualType
,
int
*
format
,
unsigned
long
*
nItems
,
unsigned
long
*
bytesAfter
,
unsigned
char
**
propData
)
{
if
(
!
pWin
)
{
...
...
@@ -527,7 +522,7 @@ GetWindowProperty(pWin, property, longOffset, longLength, delete,
* Return type, format, value to client
*/
unsigned
long
n
=
(
pProp
->
format
/
8
)
*
pProp
->
size
;
/* size (bytes) of prop */
unsigned
long
ind
=
longOffset
<<
2
;
unsigned
long
ind
=
longOffset
<<
2
;
/* byte offset */
/* If longOffset is invalid such that it causes "len" to
be negative, it's a value error. */
...
...
@@ -540,6 +535,7 @@ GetWindowProperty(pWin, property, longOffset, longLength, delete,
return
BadValue
;
}
/* minimum of prop size and requested size */
unsigned
long
len
=
min
(
n
-
ind
,
4
*
longLength
);
*
bytesAfter
=
n
-
(
ind
+
len
);
...
...
@@ -577,7 +573,6 @@ GetWindowProperty(pWin, property, longOffset, longLength, delete,
}
return
Success
;
}
#endif
int
ProcDeleteProperty
(
register
ClientPtr
client
)
...
...
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