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
c8cec758
You need to sign in or sign up before continuing.
Commit
c8cec758
authored
Feb 15, 2020
by
Ulrich Sibiller
Committed by
Mike Gabriel
May 31, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clipboard.c: drop notifyConvertFailure
Moving the client check to sendSelectionNotifyEventToClient enables us to drop notifyConvertFailure.
parent
ea0da6aa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
24 deletions
+15
-24
Clipboard.c
nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
+15
-24
No files found.
nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
View file @
c8cec758
...
...
@@ -241,9 +241,6 @@ static void initSelectionOwner(int index, Atom selection);
static
void
clearSelectionOwner
(
int
index
);
static
void
storeSelectionOwner
(
int
index
,
Selection
*
sel
);
static
Bool
matchSelectionOwner
(
int
index
,
ClientPtr
pClient
,
WindowPtr
pWindow
);
static
void
notifyConvertFailure
(
ClientPtr
client
,
Window
requestor
,
Atom
selection
,
Atom
target
,
Time
time
);
static
void
setSelectionOwner
(
Selection
*
pSelection
);
static
int
sendEventToClient
(
ClientPtr
client
,
xEvent
*
pEvents
);
static
void
sendSelectionNotifyEventToClient
(
ClientPtr
client
,
...
...
@@ -493,6 +490,18 @@ static void sendSelectionNotifyEventToClient(ClientPtr client,
Atom
target
,
Atom
property
)
{
/*
* Check if the client is still valid.
*/
if
(
clients
[
client
->
index
]
!=
client
)
{
#ifdef WARNING
fprintf
(
stderr
,
"%s: WARNING! Invalid client pointer."
,
__func__
);
#endif
return
;
}
xEvent
x
=
{
0
};
x
.
u
.
u
.
type
=
SelectionNotify
;
x
.
u
.
selectionNotify
.
time
=
time
;
...
...
@@ -1714,24 +1723,6 @@ FIXME
*/
}
static
void
notifyConvertFailure
(
ClientPtr
client
,
Window
requestor
,
Atom
selection
,
Atom
target
,
Time
time
)
{
/*
* Check if the client is still valid.
*/
if
(
clients
[
client
->
index
]
!=
client
)
{
#ifdef WARNING
fprintf
(
stderr
,
"%s: WARNING! Invalid client pointer."
,
__func__
);
#endif
return
;
}
sendSelectionNotifyEventToClient
(
client
,
time
,
requestor
,
selection
,
target
,
None
);
}
/*
* This is called from dix (ProcConvertSelection) if an nxagent client
* issues a ConvertSelection request. So all the Atoms are internal
...
...
@@ -1788,8 +1779,8 @@ int nxagentConvertSelection(ClientPtr client, WindowPtr pWin, Atom selection,
"notifying failure to client
\n
"
,
__func__
);
#endif
notifyConvertFailure
(
lastClientClientPtr
,
lastClientRequestor
,
lastClientSelection
,
lastClientTarget
,
lastClientTim
e
);
sendSelectionNotifyEventToClient
(
lastClientClientPtr
,
lastClientTime
,
lastClientRequestor
,
lastClientSelection
,
lastClientTarget
,
Non
e
);
setClientSelectionStage
(
SelectionStageNone
);
}
...
...
@@ -1805,7 +1796,7 @@ int nxagentConvertSelection(ClientPtr client, WindowPtr pWin, Atom selection,
"before timeout expired on last request, notifying failure to client
\n
"
,
__func__
);
#endif
notifyConvertFailure
(
client
,
requestor
,
selection
,
target
,
tim
e
);
sendSelectionNotifyEventToClient
(
client
,
time
,
requestor
,
selection
,
target
,
Non
e
);
return
1
;
}
...
...
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