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
79867f4a
Commit
79867f4a
authored
Aug 05, 2019
by
Ulrich Sibiller
Committed by
Mike Gabriel
Sep 29, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clipboard.c: introduce nxagent{Clear,Store}SelectionOwner
parent
6621c53c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
13 deletions
+22
-13
Clipboard.c
nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
+22
-13
No files found.
nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
View file @
79867f4a
...
...
@@ -464,6 +464,23 @@ Bool nxagentValidServerTargets(Atom target)
return
False
;
}
void
nxagentClearSelectionOwner
(
SelectionOwner
*
owner
)
{
/* there's no owner on nxagent side anymore */
owner
->
client
=
NULL
;
owner
->
window
=
None
;
owner
->
lastTimeChanged
=
GetTimeInMillis
();
/* FIXME: why is windowPtr not cleared in the function? */
}
void
nxagentStoreSelectionOwner
(
SelectionOwner
*
owner
,
Selection
*
sel
)
{
owner
->
client
=
sel
->
client
;
owner
->
window
=
sel
->
window
;
owner
->
windowPtr
=
sel
->
pWin
;
owner
->
lastTimeChanged
=
GetTimeInMillis
();
}
void
nxagentClearClipboard
(
ClientPtr
pClient
,
WindowPtr
pWindow
)
{
#ifdef DEBUG
...
...
@@ -487,10 +504,9 @@ void nxagentClearClipboard(ClientPtr pClient, WindowPtr pWindow)
(
void
*
)
pClient
,
(
void
*
)
pWindow
);
#endif
lastSelectionOwner
[
i
].
client
=
NULL
;
lastSelectionOwner
[
i
].
window
=
None
;
/* FIXME: why is windowPtr not cleared in the function? */
nxagentClearSelectionOwner
(
&
lastSelectionOwner
[
i
])
;
lastSelectionOwner
[
i
].
windowPtr
=
NULL
;
lastSelectionOwner
[
i
].
lastTimeChanged
=
GetTimeInMillis
();
lastClientWindowPtr
=
NULL
;
SetClientSelectionStage
(
None
);
...
...
@@ -547,9 +563,7 @@ void nxagentClearSelection(XEvent *X)
CurrentSelections
[
i
].
window
=
screenInfo
.
screens
[
0
]
->
root
->
drawable
.
id
;
CurrentSelections
[
i
].
client
=
NullClient
;
lastSelectionOwner
[
i
].
client
=
NULL
;
lastSelectionOwner
[
i
].
window
=
None
;
lastSelectionOwner
[
i
].
lastTimeChanged
=
GetTimeInMillis
();
nxagentClearSelectionOwner
(
&
lastSelectionOwner
[
i
]);
}
lastClientWindowPtr
=
NULL
;
...
...
@@ -1221,10 +1235,8 @@ void nxagentResetSelectionOwner(void)
fprintf
(
stderr
,
"%s: Reset clipboard state.
\n
"
,
__func__
);
#endif
lastSelectionOwner
[
i
].
client
=
NULL
;
lastSelectionOwner
[
i
].
window
=
None
;
nxagentClearSelectionOwner
(
&
lastSelectionOwner
[
i
]);
lastSelectionOwner
[
i
].
windowPtr
=
NULL
;
lastSelectionOwner
[
i
].
lastTimeChanged
=
GetTimeInMillis
();
}
lastClientWindowPtr
=
NULL
;
...
...
@@ -1352,10 +1364,7 @@ void nxagentSetSelectionOwner(Selection *pSelection)
*/
XSetSelectionOwner
(
nxagentDisplay
,
lastSelectionOwner
[
i
].
selection
,
serverWindow
,
CurrentTime
);
lastSelectionOwner
[
i
].
client
=
pSelection
->
client
;
lastSelectionOwner
[
i
].
window
=
pSelection
->
window
;
lastSelectionOwner
[
i
].
windowPtr
=
pSelection
->
pWin
;
lastSelectionOwner
[
i
].
lastTimeChanged
=
GetTimeInMillis
();
nxagentStoreSelectionOwner
(
&
lastSelectionOwner
[
i
],
pSelection
);
}
}
...
...
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