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
4a7faa8b
Commit
4a7faa8b
authored
Jan 10, 2019
by
Ulrich Sibiller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Window.c: move WM_STATE handling to separate function
parent
4214a719
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
17 deletions
+19
-17
Window.c
nx-X11/programs/Xserver/hw/nxagent/Window.c
+19
-17
No files found.
nx-X11/programs/Xserver/hw/nxagent/Window.c
View file @
4a7faa8b
...
...
@@ -1822,6 +1822,18 @@ Bool nxagentChangeWindowAttributes(WindowPtr pWin, unsigned long mask)
return
1
;
}
void
nxagentSetWMState
(
WindowPtr
pWin
,
CARD32
desired
)
{
Atom
prop
=
MakeAtom
(
"WM_STATE"
,
strlen
(
"WM_STATE"
),
True
);
nxagentWMStateRec
wmState
=
{.
state
=
desired
,
.
icon
=
None
};
if
(
ChangeWindowProperty
(
pWin
,
prop
,
prop
,
32
,
0
,
2
,
&
wmState
,
1
)
!=
Success
)
{
#ifdef WARNING
fprintf
(
stderr
,
"%s: Changing WM_STATE failed.
\n
"
,
__func__
);
#endif
}
}
Bool
nxagentRealizeWindow
(
WindowPtr
pWin
)
{
if
(
nxagentScreenTrap
==
1
)
...
...
@@ -1843,14 +1855,7 @@ Bool nxagentRealizeWindow(WindowPtr pWin)
/* add by dimbor */
if
(
nxagentOption
(
Rootless
)
&&
nxagentWindowTopLevel
(
pWin
))
{
Atom
prop
=
MakeAtom
(
"WM_STATE"
,
strlen
(
"WM_STATE"
),
True
);
nxagentWMStateRec
wmState
;
wmState
.
state
=
1
;
/* NormalState */
wmState
.
icon
=
None
;
if
(
ChangeWindowProperty
(
pWin
,
prop
,
prop
,
32
,
0
,
2
,
&
wmState
,
1
)
!=
Success
)
{
fprintf
(
stderr
,
"nxagentRealizeWindow: Adding WM_STATE fail.
\n
"
);
}
nxagentSetWMState
(
pWin
,
NormalState
);
}
/*
...
...
@@ -1878,7 +1883,7 @@ Bool nxagentRealizeWindow(WindowPtr pWin)
#ifdef TEST
if
(
nxagentOption
(
Rootless
)
&&
nxagentLastWindowDestroyed
)
{
fprintf
(
stderr
,
"
nxagentRealizeWindow: Window realized. Stopped termination for rootless session.
\n
"
);
fprintf
(
stderr
,
"
%s: Window realized. Stopped termination for rootless session.
\n
"
,
__func__
);
}
#endif
...
...
@@ -1899,14 +1904,11 @@ Bool nxagentUnrealizeWindow(WindowPtr pWin)
/* add by dimbor */
if
(
nxagentOption
(
Rootless
)
&&
nxagentWindowTopLevel
(
pWin
))
{
Atom
prop
=
MakeAtom
(
"WM_STATE"
,
strlen
(
"WM_STATE"
),
True
);
nxagentWMStateRec
wmState
;
wmState
.
state
=
3
;
/* WithdrawnState */
wmState
.
icon
=
None
;
if
(
ChangeWindowProperty
(
pWin
,
prop
,
prop
,
32
,
0
,
2
,
&
wmState
,
1
)
!=
Success
)
{
fprintf
(
stderr
,
"nxagentUnRealizeWindow: Changing WM_STATE failed.
\n
"
);
}
/*
* The original _comment_ was WithdrawnState, while the _value_
* was 3, which is IconicState.
*/
nxagentSetWMState
(
pWin
,
IconicState
);
}
XUnmapWindow
(
nxagentDisplay
,
nxagentWindow
(
pWin
));
...
...
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