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
5121188f
Commit
5121188f
authored
Jan 31, 2021
by
Ulrich Sibiller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
NXproperty.c: reorder functions
Make it obvious that GetWindowProperty() and ChangeWindowProperty are not derived from dix.
parent
d627e948
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
29 deletions
+31
-29
NXproperty.c
nx-X11/programs/Xserver/hw/nxagent/NXproperty.c
+31
-29
No files found.
nx-X11/programs/Xserver/hw/nxagent/NXproperty.c
View file @
5121188f
...
...
@@ -208,28 +208,6 @@ ProcChangeProperty(ClientPtr client)
}
}
int
ChangeWindowProperty
(
WindowPtr
pWin
,
Atom
property
,
Atom
type
,
int
format
,
int
mode
,
unsigned
long
len
,
void
*
value
,
Bool
sendevent
)
{
int
sizeInBytes
=
format
>>
3
;
int
totalSize
=
len
*
sizeInBytes
;
int
copySize
=
nxagentOption
(
CopyBufferSize
);
if
(
copySize
!=
COPY_UNLIMITED
&&
property
==
clientCutProperty
)
{
if
(
totalSize
>
copySize
)
{
totalSize
=
copySize
;
totalSize
=
totalSize
-
(
totalSize
%
sizeInBytes
);
len
=
totalSize
/
sizeInBytes
;
}
}
return
xorg_ChangeWindowProperty
(
pWin
,
property
,
type
,
format
,
mode
,
len
,
value
,
sendevent
);
}
/*****************
* GetProperty
* If type Any is specified, returns the property from the specified
...
...
@@ -443,6 +421,20 @@ ProcGetProperty(ClientPtr client)
return
(
client
->
noClientException
);
}
int
ProcDeleteProperty
(
register
ClientPtr
client
)
{
REQUEST
(
xDeletePropertyReq
);
REQUEST_SIZE_MATCH
(
xDeletePropertyReq
);
/* prevent clients from deleting the NX_AGENT_VERSION property */
if
(
stuff
->
property
==
MakeAtom
(
"NX_AGENT_VERSION"
,
strlen
(
"NX_AGENT_VERSION"
),
True
))
return
client
->
noClientException
;
return
xorg_ProcDeleteProperty
(
client
);
}
/* ---------------------------------------------------------------------- */
/*
* GetWindowProperty is the internal implementation of the
* XGetWindowProperty() Xlib call. It is called from
...
...
@@ -572,13 +564,23 @@ GetWindowProperty(WindowPtr pWin, Atom property, long longOffset,
}
int
ProcDeleteProperty
(
register
ClientPtr
client
)
ChangeWindowProperty
(
WindowPtr
pWin
,
Atom
property
,
Atom
type
,
int
format
,
int
mode
,
unsigned
long
len
,
void
*
value
,
Bool
sendevent
)
{
REQUEST
(
xDeletePropertyReq
);
REQUEST_SIZE_MATCH
(
xDeletePropertyReq
);
/* prevent clients from deleting the NX_AGENT_VERSION property */
if
(
stuff
->
property
==
MakeAtom
(
"NX_AGENT_VERSION"
,
strlen
(
"NX_AGENT_VERSION"
),
True
))
return
client
->
noClientException
;
int
sizeInBytes
=
format
>>
3
;
int
totalSize
=
len
*
sizeInBytes
;
int
copySize
=
nxagentOption
(
CopyBufferSize
);
return
xorg_ProcDeleteProperty
(
client
);
if
(
copySize
!=
COPY_UNLIMITED
&&
property
==
clientCutProperty
)
{
if
(
totalSize
>
copySize
)
{
totalSize
=
copySize
;
totalSize
=
totalSize
-
(
totalSize
%
sizeInBytes
);
len
=
totalSize
/
sizeInBytes
;
}
}
return
xorg_ChangeWindowProperty
(
pWin
,
property
,
type
,
format
,
mode
,
len
,
value
,
sendevent
);
}
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