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
6ed435e4
Commit
6ed435e4
authored
Oct 28, 2019
by
Ulrich Sibiller
Committed by
Mike Gabriel
Nov 01, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
NXevents.c: use XYToWindow from dix
add a callback to determine the starting window.
parent
f887d428
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
53 deletions
+20
-53
events.c
nx-X11/programs/Xserver/dix/events.c
+12
-3
NXevents.c
nx-X11/programs/Xserver/hw/nxagent/NXevents.c
+8
-50
No files found.
nx-X11/programs/Xserver/dix/events.c
View file @
6ed435e4
...
...
@@ -1914,7 +1914,17 @@ PointInBorderSize(WindowPtr pWin, int x, int y)
return
FALSE
;
}
#ifndef NXAGENT_SERVER
/* define XYWINDOWCALLBACK if your DDX provides this callback */
static
WindowPtr
GetXYStartWindow
(
WindowPtr
pWin
);
#ifndef XYWINDOWCALLBACK
static
WindowPtr
GetXYStartWindow
(
WindowPtr
pWin
)
{
return
pWin
;
}
#endif
static
WindowPtr
XYToWindow
(
int
x
,
int
y
)
{
...
...
@@ -1922,7 +1932,7 @@ XYToWindow(int x, int y)
BoxRec
box
;
spriteTraceGood
=
1
;
/* root window still there */
pWin
=
ROOT
->
firstChild
;
pWin
=
GetXYStartWindow
(
ROOT
->
firstChild
)
;
while
(
pWin
)
{
if
((
pWin
->
mapped
)
&&
...
...
@@ -1960,7 +1970,6 @@ XYToWindow(int x, int y)
}
return
spriteTrace
[
spriteTraceGood
-
1
];
}
#endif
/* NXAGENT_SERVER */
#ifndef NXAGENT_SERVER
static
Bool
...
...
nx-X11/programs/Xserver/hw/nxagent/NXevents.c
View file @
6ed435e4
...
...
@@ -135,6 +135,7 @@ of the copyright holder.
#include <nx-X11/Xlib.h>
#define XYWINDOWCALLBACK
#include "../../dix/events.c"
#include "compext/Compext.h"
...
...
@@ -251,15 +252,14 @@ ProcAllowEvents(register ClientPtr client)
return
Success
;
}
/*
* called from XYToWindow to determine where XYToWindow() should start
* going through the list.
*/
static
WindowPtr
XYToWindow
(
int
x
,
int
y
)
GetXYStartWindow
(
WindowPtr
pWin
)
{
register
WindowPtr
pWin
;
BoxRec
box
;
spriteTraceGood
=
1
;
/* root window still there */
#ifdef NXAGENT_SERVER
if
(
nxagentOption
(
Rootless
))
{
if
(
nxagentLastEnteredWindow
==
NULL
)
...
...
@@ -274,49 +274,7 @@ XYToWindow(int x, int y)
pWin
=
pWin
->
prevSib
;
}
}
else
{
pWin
=
ROOT
->
firstChild
;
}
#else
pWin
=
ROOT
->
firstChild
;
#endif
while
(
pWin
)
{
if
((
pWin
->
mapped
)
&&
(
x
>=
pWin
->
drawable
.
x
-
wBorderWidth
(
pWin
))
&&
(
x
<
pWin
->
drawable
.
x
+
(
int
)
pWin
->
drawable
.
width
+
wBorderWidth
(
pWin
))
&&
(
y
>=
pWin
->
drawable
.
y
-
wBorderWidth
(
pWin
))
&&
(
y
<
pWin
->
drawable
.
y
+
(
int
)
pWin
->
drawable
.
height
+
wBorderWidth
(
pWin
))
#ifdef SHAPE
/* When a window is shaped, a further check
* is made to see if the point is inside
* borderSize
*/
&&
(
!
wBoundingShape
(
pWin
)
||
PointInBorderSize
(
pWin
,
x
,
y
))
&&
(
!
wInputShape
(
pWin
)
||
RegionContainsPoint
(
wInputShape
(
pWin
),
x
-
pWin
->
drawable
.
x
,
y
-
pWin
->
drawable
.
y
,
&
box
))
#endif
)
{
if
(
spriteTraceGood
>=
spriteTraceSize
)
{
spriteTraceSize
+=
10
;
spriteTrace
=
realloc
(
spriteTrace
,
spriteTraceSize
*
sizeof
(
WindowPtr
));
}
spriteTrace
[
spriteTraceGood
++
]
=
pWin
;
pWin
=
pWin
->
firstChild
;
}
else
pWin
=
pWin
->
nextSib
;
}
return
spriteTrace
[
spriteTraceGood
-
1
];
return
pWin
;
}
static
Bool
...
...
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