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
cbe2c0e4
Unverified
Commit
cbe2c0e4
authored
Aug 11, 2017
by
Mike Gabriel
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'uli42-pr/versionprop' into 3.6.x
Attributes GH PR #501:
https://github.com/ArcticaProject/nx-libs/pull/501
parents
8235925a
715fcfe6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
0 deletions
+29
-0
NXproperty.c
nx-X11/programs/Xserver/hw/nxagent/NXproperty.c
+9
-0
NXwindow.c
nx-X11/programs/Xserver/hw/nxagent/NXwindow.c
+4
-0
Window.c
nx-X11/programs/Xserver/hw/nxagent/Window.c
+16
-0
No files found.
nx-X11/programs/Xserver/hw/nxagent/NXproperty.c
View file @
cbe2c0e4
...
...
@@ -169,6 +169,15 @@ ProcChangeProperty(ClientPtr client)
}
#endif
#ifdef NXAGENT_SERVER
/* prevent clients from changing the NX_AGENT_VERSION property */
{
Atom
prop
=
MakeAtom
(
"NX_AGENT_VERSION"
,
strlen
(
"NX_AGENT_VERSION"
),
True
);
if
(
stuff
->
property
==
prop
)
return
client
->
noClientException
;
}
#endif
err
=
ChangeWindowProperty
(
pWin
,
stuff
->
property
,
stuff
->
type
,
(
int
)
format
,
(
int
)
mode
,
len
,
(
void
*
)
&
stuff
[
1
],
TRUE
);
if
(
err
!=
Success
)
...
...
nx-X11/programs/Xserver/hw/nxagent/NXwindow.c
View file @
cbe2c0e4
...
...
@@ -134,6 +134,8 @@ extern Bool nxagentScreenTrap;
WindowPtr
nxagentRootTileWindow
;
extern
void
nxagentSetVersionProperty
(
WindowPtr
pWin
);
void
nxagentClearSplash
(
WindowPtr
pW
)
{
ScreenPtr
pScreen
;
...
...
@@ -293,6 +295,8 @@ InitRootWindow(WindowPtr pWin)
nxagentPropagateArtsdProperties
(
pScreen
,
artsd_port
);
}
#endif
nxagentSetVersionProperty
(
pWin
);
}
/*****
...
...
nx-X11/programs/Xserver/hw/nxagent/Window.c
View file @
cbe2c0e4
...
...
@@ -532,6 +532,22 @@ FIXME: Do all the windows for which nxagentWindowTopLevel(pWin)
return
True
;
}
/* set the NX_AGENT_VERSION property for the given window (normally
the root window) */
void
nxagentSetVersionProperty
(
WindowPtr
pWin
)
{
char
*
name
=
"NX_AGENT_VERSION"
;
Atom
prop
=
MakeAtom
(
name
,
strlen
(
name
),
True
);
if
(
ChangeWindowProperty
(
pWin
,
prop
,
XA_STRING
,
8
,
PropModeReplace
,
strlen
(
NX_VERSION_CURRENT_STRING
),
NX_VERSION_CURRENT_STRING
,
True
)
!=
Success
)
fprintf
(
stderr
,
"%s: Adding propery [%s], value [%s] failed.
\n
"
,
__func__
,
name
,
NX_VERSION_CURRENT_STRING
);
#ifdef DEBUG
else
fprintf
(
stderr
,
"%s: Added property [%s], value [%s] for root window [%x].
\n
"
,
__func__
,
name
,
NX_VERSION_CURRENT_STRING
,
pWin
);
#endif
}
Bool
nxagentSomeWindowsAreMapped
()
{
WindowPtr
pWin
=
screenInfo
.
screens
[
0
]
->
root
->
firstChild
;
...
...
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