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
a4dd6a46
Commit
a4dd6a46
authored
May 25, 2020
by
Ulrich Sibiller
Committed by
Mike Gabriel
Oct 17, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Events.c: store parent window from event to meaningful variable
parent
ffbc63f9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
9 deletions
+7
-9
Events.c
nx-X11/programs/Xserver/hw/nxagent/Events.c
+7
-9
No files found.
nx-X11/programs/Xserver/hw/nxagent/Events.c
View file @
a4dd6a46
...
...
@@ -3602,9 +3602,9 @@ int nxagentHandleReparentNotify(XEvent* X)
* Calculate the absolute upper-left X e Y
*/
XlibWindow
parent
=
X
->
xreparent
.
parent
;
XWindowAttributes
attributes
;
if
((
XGetWindowAttributes
(
nxagentDisplay
,
X
->
xreparent
.
window
,
&
attributes
)
==
0
))
if
((
XGetWindowAttributes
(
nxagentDisplay
,
parent
,
&
attributes
)
==
0
))
{
#ifdef WARNING
fprintf
(
stderr
,
"%s: WARNING! XGetWindowAttributes for parent window failed.
\n
"
,
__func__
);
...
...
@@ -3622,7 +3622,7 @@ int nxagentHandleReparentNotify(XEvent* X)
int
before_y
=
y
;
#endif
XTranslateCoordinates
(
nxagentDisplay
,
X
->
xreparent
.
window
,
XTranslateCoordinates
(
nxagentDisplay
,
parent
,
attributes
.
root
,
-
attributes
.
border_width
,
-
attributes
.
border_width
,
&
x
,
&
y
,
&
junk
);
...
...
@@ -3634,9 +3634,7 @@ int nxagentHandleReparentNotify(XEvent* X)
* Calculate the parent X and parent Y.
*/
XlibWindow
w
=
X
->
xreparent
.
parent
;
if
(
w
!=
DefaultRootWindow
(
nxagentDisplay
))
if
(
parent
!=
DefaultRootWindow
(
nxagentDisplay
))
{
XlibWindow
rootReturn
=
0
;
XlibWindow
parentReturn
=
0
;
...
...
@@ -3645,7 +3643,7 @@ int nxagentHandleReparentNotify(XEvent* X)
do
{
Status
result
=
XQueryTree
(
nxagentDisplay
,
w
,
&
rootReturn
,
&
parentReturn
,
Status
result
=
XQueryTree
(
nxagentDisplay
,
parent
,
&
rootReturn
,
&
parentReturn
,
&
childrenReturn
,
&
nchildrenReturn
);
SAFE_XFree
(
childrenReturn
);
...
...
@@ -3655,7 +3653,7 @@ int nxagentHandleReparentNotify(XEvent* X)
break
;
}
w
=
parentReturn
;
parent
=
parentReturn
;
}
while
(
True
);
...
...
@@ -3663,7 +3661,7 @@ int nxagentHandleReparentNotify(XEvent* X)
* WM reparented. Find edge of the frame.
*/
if
(
XGetWindowAttributes
(
nxagentDisplay
,
w
,
&
attributes
)
==
0
)
if
(
XGetWindowAttributes
(
nxagentDisplay
,
parent
,
&
attributes
)
==
0
)
{
#ifdef WARNING
fprintf
(
stderr
,
"%s: WARNING! XGetWindowAttributes failed for parent window.
\n
"
,
__func__
);
...
...
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