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
a2523273
You need to sign in or sign up before continuing.
Unverified
Commit
a2523273
authored
Jun 11, 2019
by
Mike Gabriel
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'uli42-pr/various_small_things' into 3.6.x
Attributes GH PR #813:
https://github.com/ArcticaProject/nx-libs/pull/813
parents
92f41213
2da476a6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
226 additions
and
37 deletions
+226
-37
Clipboard.c
nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
+20
-7
Events.c
nx-X11/programs/Xserver/hw/nxagent/Events.c
+7
-0
Screen.c
nx-X11/programs/Xserver/hw/nxagent/Screen.c
+33
-22
Window.c
nx-X11/programs/Xserver/hw/nxagent/Window.c
+166
-8
No files found.
nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
View file @
a2523273
...
...
@@ -305,7 +305,7 @@ void nxagentPrintClipboardStat(char *header)
fprintf
(
stderr
,
" lastClientSelection (Atom) [% 4d][%s]
\n
"
,
lastClientSelection
,
NameForAtom
(
lastClientSelection
));
fprintf
(
stderr
,
" lastClientTarget (Atom) [% 4d][%s]
\n
"
,
lastClientTarget
,
NameForAtom
(
lastClientTarget
));
fprintf
(
stderr
,
" lastClientTime (Time) [%u]
\n
"
,
lastServerTime
);
fprintf
(
stderr
,
" lastClientReqTime (Time) [%u]
\n
"
,
lastServerTime
);
fprintf
(
stderr
,
" lastClientReqTime (Time) [%u]
\n
"
,
lastServer
Req
Time
);
fprintf
(
stderr
,
" lastClientPropertySize (unsigned long) [%lu]
\n
"
,
lastClientPropertySize
);
fprintf
(
stderr
,
" lastClientStage (ClientSelectionStage) [%d][%s]
\n
"
,
lastClientStage
,
GetClientSelectionStageString
(
lastClientStage
));
...
...
@@ -392,8 +392,6 @@ Bool nxagentValidServerTargets(Atom target)
void
nxagentClearClipboard
(
ClientPtr
pClient
,
WindowPtr
pWindow
)
{
int
i
;
#ifdef DEBUG
fprintf
(
stderr
,
"%s: Called with client [%p] window [%p].
\n
"
,
__func__
,
(
void
*
)
pClient
,
(
void
*
)
pWindow
);
...
...
@@ -405,7 +403,7 @@ void nxagentClearClipboard(ClientPtr pClient, WindowPtr pWindow)
* Only for PRIMARY and CLIPBOARD selections.
*/
for
(
i
=
0
;
i
<
nxagentMaxSelections
;
i
++
)
for
(
i
nt
i
=
0
;
i
<
nxagentMaxSelections
;
i
++
)
{
if
((
pClient
!=
NULL
&&
lastSelectionOwner
[
i
].
client
==
pClient
)
||
(
pWindow
!=
NULL
&&
lastSelectionOwner
[
i
].
windowPtr
==
pWindow
))
...
...
@@ -1241,7 +1239,9 @@ void nxagentResetSelectionOwner(void)
{
XSetSelectionOwner
(
nxagentDisplay
,
lastSelectionOwner
[
i
].
selection
,
serverWindow
,
CurrentTime
);
#ifdef DEBUG
fprintf
(
stderr
,
"%s: Reset clipboard state.
\n
"
,
__func__
);
#endif
lastSelectionOwner
[
i
].
client
=
NULL
;
lastSelectionOwner
[
i
].
window
=
None
;
...
...
@@ -1259,7 +1259,6 @@ void nxagentResetSelectionOwner(void)
void
nxagentSetSelectionOwner
(
Selection
*
pSelection
)
{
int
i
;
#ifdef DEBUG
fprintf
(
stderr
,
"%s: Got called.
\n
"
,
__func__
);
#endif
...
...
@@ -1270,7 +1269,7 @@ void nxagentSetSelectionOwner(Selection *pSelection)
}
#ifdef DEBUG
fprintf
(
stderr
,
"%s: Setting selection owner to
window [0x%x]
.
\n
"
,
__func__
,
fprintf
(
stderr
,
"%s: Setting selection owner to
serverwindow ([0x%x])
.
\n
"
,
__func__
,
serverWindow
);
#endif
...
...
@@ -1286,10 +1285,24 @@ void nxagentSetSelectionOwner(Selection *pSelection)
* Only for PRIMARY and CLIPBOARD selections.
*/
for
(
i
=
0
;
i
<
nxagentMaxSelections
;
i
++
)
for
(
i
nt
i
=
0
;
i
<
nxagentMaxSelections
;
i
++
)
{
if
(
pSelection
->
selection
==
CurrentSelections
[
i
].
selection
)
{
#ifdef DEBUG
fprintf
(
stderr
,
"%s: lastSelectionOwner.client [0x%x] -> [0x%x]
\n
"
,
__func__
,
lastSelectionOwner
[
i
].
client
,
pSelection
->
client
);
fprintf
(
stderr
,
"%s: lastSelectionOwner.window [0x%x] -> [0x%x]
\n
"
,
__func__
,
lastSelectionOwner
[
i
].
window
,
pSelection
->
window
);
fprintf
(
stderr
,
"%s: lastSelectionOwner.windowPtr [0x%x] -> [0x%x] [0x%x] (serverWindow: [0x%x])
\n
"
,
__func__
,
lastSelectionOwner
[
i
].
windowPtr
,
pSelection
->
pWin
,
nxagentWindow
(
pSelection
->
pWin
),
serverWindow
);
fprintf
(
stderr
,
"%s: lastSelectionOwner.lastTimeChanged [%d]
\n
"
,
__func__
,
lastSelectionOwner
[
i
].
lastTimeChanged
);
#endif
/*
* inform the real X server that our serverWindow is the
* clipboard owner. The real owner window (inside nxagent) is
* stored in lastSelectionOwner.window.
* lastSelectionOwner.windowPtr points to the struct that
* contains all information about the owner window
*/
XSetSelectionOwner
(
nxagentDisplay
,
lastSelectionOwner
[
i
].
selection
,
serverWindow
,
CurrentTime
);
lastSelectionOwner
[
i
].
client
=
pSelection
->
client
;
...
...
nx-X11/programs/Xserver/hw/nxagent/Events.c
View file @
a2523273
...
...
@@ -2940,6 +2940,13 @@ int nxagentHandleXFixesSelectionNotify(XEvent *X)
#endif
#ifdef DEBUG
fprintf
(
stderr
,
"%s: CurrentSelections[i].lastTimeChanged [%d]
\n
"
,
__func__
,
CurrentSelections
[
i
].
lastTimeChanged
.
milliseconds
);
fprintf
(
stderr
,
"%s: Event timestamp [%ld]
\n
"
,
__func__
,
xfixesEvent
->
xfixesselection
.
timestamp
);
fprintf
(
stderr
,
"%s: Event selection timestamp [%ld]
\n
"
,
__func__
,
xfixesEvent
->
xfixesselection
.
selection_timestamp
);
fprintf
(
stderr
,
"%s: Event selection window [0x%x]
\n
"
,
__func__
,
xfixesEvent
->
xfixesselection
.
window
);
fprintf
(
stderr
,
"%s: Event selection owner [0x%x]
\n
"
,
__func__
,
xfixesEvent
->
xfixesselection
.
owner
);
fprintf
(
stderr
,
"%s: Event selection [%s]
\n
"
,
__func__
,
NameForAtom
(
nxagentRemoteToLocalAtom
(
xfixesEvent
->
xfixesselection
.
selection
)));
fprintf
(
stderr
,
"nxagentHandleXFixesSelectionNotify: Subtype "
);
switch
(
xfixesEvent
->
xfixesselection
.
subtype
)
...
...
nx-X11/programs/Xserver/hw/nxagent/Screen.c
View file @
a2523273
...
...
@@ -404,11 +404,11 @@ Window nxagentCreateIconWindow(void)
if
(
nxagentReportWindowIds
)
{
fprintf
(
stderr
,
"NXAGENT_WINDOW_ID: ICON_WINDOW,WID:[0x%x]
\n
"
,
nxagentIconWindo
w
);
fprintf
(
stderr
,
"NXAGENT_WINDOW_ID: ICON_WINDOW,WID:[0x%x]
\n
"
,
w
);
}
#ifdef TEST
fprintf
(
stderr
,
"nxagentCreateIconWindow: Created new icon window with id [0x%x].
\n
"
,
nxagentIconWindo
w
);
w
);
#endif
/*
...
...
@@ -1776,32 +1776,43 @@ N/A
nxagentDefaultVisual
(
pScreen
),
valuemask
,
&
attributes
);
if
(
nxagentOption
(
Rootless
)
==
0
)
{
valuemask
=
CWEventMask
;
mask
=
PointerMotionMask
;
attributes
.
event_mask
=
mask
;
nxagentInputWindows
[
pScreen
->
myNum
]
=
XCreateWindow
(
nxagentDisplay
,
nxagentDefaultWindows
[
pScreen
->
myNum
],
0
,
0
,
nxagentOption
(
Width
),
nxagentOption
(
Height
),
0
,
0
,
InputOnly
,
nxagentDefaultVisual
(
pScreen
),
valuemask
,
&
attributes
);
}
if
(
nxagentReportWindowIds
)
{
fprintf
(
stderr
,
"NXAGENT_WINDOW_ID: SCREEN_WINDOW:[%d],WID:[0x%x]
\n
"
,
pScreen
->
myNum
,
nxagentInpu
tWindows
[
pScreen
->
myNum
]);
fprintf
(
stderr
,
"NXAGENT_WINDOW_ID: SCREEN_WINDOW:[%d],WID:[0x%x]
\n
"
,
pScreen
->
myNum
,
nxagentDefaul
tWindows
[
pScreen
->
myNum
]);
}
#ifdef TEST
fprintf
(
stderr
,
"nxagentOpenScreen: Created new default window with id [0x%x].
\n
"
,
nxagentDefaultWindows
[
pScreen
->
myNum
]);
fprintf
(
stderr
,
"nxagentOpenScreen: Created new default window
for screen [%d]
with id [0x%x].
\n
"
,
pScreen
->
myNum
,
nxagentDefaultWindows
[
pScreen
->
myNum
]);
#endif
if
(
nxagentOption
(
Rootless
)
==
0
)
{
valuemask
=
CWEventMask
;
mask
=
PointerMotionMask
;
attributes
.
event_mask
=
mask
;
nxagentInputWindows
[
pScreen
->
myNum
]
=
XCreateWindow
(
nxagentDisplay
,
nxagentDefaultWindows
[
pScreen
->
myNum
],
0
,
0
,
nxagentOption
(
Width
),
nxagentOption
(
Height
),
0
,
0
,
InputOnly
,
nxagentDefaultVisual
(
pScreen
),
valuemask
,
&
attributes
);
if
(
nxagentReportWindowIds
)
{
fprintf
(
stderr
,
"NXAGENT_WINDOW_ID: INPUT_WINDOW:[%d],WID:[0x%x]
\n
"
,
pScreen
->
myNum
,
nxagentInputWindows
[
pScreen
->
myNum
]);
}
#ifdef TEST
fprintf
(
stderr
,
"nxagentOpenScreen: Created new input window for screen [%d] with id [0x%x].
\n
"
,
pScreen
->
myNum
,
nxagentInputWindows
[
pScreen
->
myNum
]);
#endif
}
/*
* Setting WM_CLASS to "X2GoAgent" when running in X2Go Agent mode
* we need it to properly display all window parameters by some WMs
...
...
nx-X11/programs/Xserver/hw/nxagent/Window.c
View file @
a2523273
This diff is collapsed.
Click to expand it.
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