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
30fb45b2
Commit
30fb45b2
authored
Dec 17, 2019
by
Ulrich Sibiller
Committed by
Mike Gabriel
Jan 05, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clipboard.c: cleanup parentheses
parent
d634f26b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
15 deletions
+17
-15
Clipboard.c
nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
+17
-15
No files found.
nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
View file @
30fb45b2
...
@@ -610,8 +610,8 @@ void nxagentClearClipboard(ClientPtr pClient, WindowPtr pWindow)
...
@@ -610,8 +610,8 @@ void nxagentClearClipboard(ClientPtr pClient, WindowPtr pWindow)
int
nxagentFindLastSelectionOwnerIndex
(
XlibAtom
sel
)
int
nxagentFindLastSelectionOwnerIndex
(
XlibAtom
sel
)
{
{
int
i
=
0
;
int
i
=
0
;
while
(
(
i
<
nxagentMaxSelections
)
&&
while
(
i
<
nxagentMaxSelections
&&
(
lastSelectionOwner
[
i
].
selection
!=
sel
)
)
lastSelectionOwner
[
i
].
selection
!=
sel
)
{
{
i
++
;
i
++
;
}
}
...
@@ -625,8 +625,8 @@ int nxagentFindLastSelectionOwnerIndex(XlibAtom sel)
...
@@ -625,8 +625,8 @@ int nxagentFindLastSelectionOwnerIndex(XlibAtom sel)
int
nxagentFindCurrentSelectionIndex
(
Atom
sel
)
int
nxagentFindCurrentSelectionIndex
(
Atom
sel
)
{
{
int
i
=
0
;
int
i
=
0
;
while
(
(
i
<
NumCurrentSelections
)
&&
while
(
i
<
NumCurrentSelections
&&
(
CurrentSelections
[
i
].
selection
!=
sel
)
)
CurrentSelections
[
i
].
selection
!=
sel
)
{
{
i
++
;
i
++
;
}
}
...
@@ -1328,7 +1328,8 @@ void nxagentHandleSelectionNotifyFromXServer(XEvent *X)
...
@@ -1328,7 +1328,8 @@ void nxagentHandleSelectionNotifyFromXServer(XEvent *X)
* the real X server). We now need to transfer it to the original
* the real X server). We now need to transfer it to the original
* requestor, which is stored in the lastClient* variables.
* requestor, which is stored in the lastClient* variables.
*/
*/
if
((
lastClientStage
==
SelectionStageNone
)
&&
(
X
->
xselection
.
property
==
serverTransToAgentProperty
))
if
(
lastClientStage
==
SelectionStageNone
&&
X
->
xselection
.
property
==
serverTransToAgentProperty
)
{
{
#ifdef DEBUG
#ifdef DEBUG
fprintf
(
stderr
,
"%s: Starting selection transferral for client [%d].
\n
"
,
__func__
,
fprintf
(
stderr
,
"%s: Starting selection transferral for client [%d].
\n
"
,
__func__
,
...
@@ -1568,10 +1569,10 @@ void nxagentSetSelectionCallback(CallbackListPtr *callbacks, void *data,
...
@@ -1568,10 +1569,10 @@ void nxagentSetSelectionCallback(CallbackListPtr *callbacks, void *data,
fprintf
(
stderr
,
"%s: pCurSel->selection [%s]
\n
"
,
__func__
,
NameForAtom
(
pCurSel
->
selection
));
fprintf
(
stderr
,
"%s: pCurSel->selection [%s]
\n
"
,
__func__
,
NameForAtom
(
pCurSel
->
selection
));
#endif
#endif
if
(
(
pCurSel
->
pWin
!=
NULL
)
&&
if
(
pCurSel
->
pWin
!=
NULL
&&
(
nxagentOption
(
Clipboard
)
!=
ClipboardNone
)
&&
/* FIXME: shouldn't we also check for != ClipboardClient? */
nxagentOption
(
Clipboard
)
!=
ClipboardNone
&&
/* FIXME: shouldn't we also check for != ClipboardClient? */
(
(
pCurSel
->
selection
==
XA_PRIMARY
)
||
(
pCurSel
->
selection
==
XA_PRIMARY
||
(
pCurSel
->
selection
==
clientCLIPBOARD
)
))
pCurSel
->
selection
==
clientCLIPBOARD
))
{
{
#ifdef DEBUG
#ifdef DEBUG
fprintf
(
stderr
,
"%s: calling nxagentSetSelectionOwner
\n
"
,
__func__
);
fprintf
(
stderr
,
"%s: calling nxagentSetSelectionOwner
\n
"
,
__func__
);
...
@@ -1897,10 +1898,10 @@ int nxagentConvertSelection(ClientPtr client, WindowPtr pWin, Atom selection,
...
@@ -1897,10 +1898,10 @@ int nxagentConvertSelection(ClientPtr client, WindowPtr pWin, Atom selection,
}
}
#endif
#endif
if
(
(
target
==
clientTEXT
)
||
if
(
target
==
clientTEXT
||
(
target
==
XA_STRING
)
||
target
==
XA_STRING
||
(
target
==
clientCOMPOUND_TEXT
)
||
target
==
clientCOMPOUND_TEXT
||
(
target
==
clientUTF8_STRING
)
)
target
==
clientUTF8_STRING
)
{
{
lastClientWindowPtr
=
pWin
;
lastClientWindowPtr
=
pWin
;
SetClientSelectionStage
(
None
);
SetClientSelectionStage
(
None
);
...
@@ -2109,8 +2110,9 @@ int nxagentSendNotify(xEvent *event)
...
@@ -2109,8 +2110,9 @@ int nxagentSendNotify(xEvent *event)
WindowPtr
nxagentGetClipboardWindow
(
Atom
property
)
WindowPtr
nxagentGetClipboardWindow
(
Atom
property
)
{
{
int
i
=
nxagentFindLastSelectionOwnerIndex
(
nxagentLastRequestedSelection
);
int
i
=
nxagentFindLastSelectionOwnerIndex
(
nxagentLastRequestedSelection
);
if
((
i
<
nxagentMaxSelections
)
&&
(
property
==
clientCutProperty
)
&&
if
(
i
<
nxagentMaxSelections
&&
(
lastSelectionOwner
[
i
].
windowPtr
!=
NULL
))
property
==
clientCutProperty
&&
lastSelectionOwner
[
i
].
windowPtr
!=
NULL
)
{
{
#ifdef DEBUG
#ifdef DEBUG
fprintf
(
stderr
,
"%s: Returning last [%d] selection owner window [%p] (0x%x).
\n
"
,
__func__
,
fprintf
(
stderr
,
"%s: Returning last [%d] selection owner window [%p] (0x%x).
\n
"
,
__func__
,
...
...
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