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
e72e2375
Commit
e72e2375
authored
Sep 05, 2019
by
Ulrich Sibiller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cursor.c: scope improvements
parent
129c8621
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
31 deletions
+24
-31
Cursor.c
nx-X11/programs/Xserver/hw/nxagent/Cursor.c
+24
-31
No files found.
nx-X11/programs/Xserver/hw/nxagent/Cursor.c
View file @
e72e2375
...
...
@@ -93,11 +93,8 @@ extern CursorPtr GetSpriteCursor(void);
void
nxagentConstrainCursor
(
ScreenPtr
pScreen
,
BoxPtr
pBox
)
{
#ifdef TEST
int
width
,
height
;
width
=
nxagentOption
(
RootWidth
);
height
=
nxagentOption
(
RootHeight
);
int
width
=
nxagentOption
(
RootWidth
);
int
height
=
nxagentOption
(
RootHeight
);
if
(
pBox
->
x1
<=
0
&&
pBox
->
y1
<=
0
&&
pBox
->
x2
>=
width
&&
pBox
->
y2
>=
height
)
...
...
@@ -150,18 +147,14 @@ Bool nxagentRealizeCursor(ScreenPtr pScreen, CursorPtr pCursor)
fprintf
(
stderr
,
"nxagentRealizeCursor: Called for cursor at [%p].
\n
"
,
(
void
*
)
pCursor
);
#endif
unsigned
long
valuemask
=
GCFunction
|
GCPlaneMask
|
GCForeground
|
GCBackground
|
GCClipMask
;
unsigned
long
valuemask
=
GCFunction
|
GCPlaneMask
|
GCForeground
|
GCBackground
|
GCClipMask
;
XGCValues
values
=
{
.
function
=
GXcopy
,
.
plane_mask
=
AllPlanes
,
.
foreground
=
1L
,
.
background
=
0L
,
.
clip_mask
=
None
.
function
=
GXcopy
,
.
plane_mask
=
AllPlanes
,
.
foreground
=
1L
,
.
background
=
0L
,
.
clip_mask
=
None
,
};
XChangeGC
(
nxagentDisplay
,
nxagentBitmapGC
,
valuemask
,
&
values
);
...
...
@@ -221,15 +214,15 @@ Bool nxagentRealizeCursor(ScreenPtr pScreen, CursorPtr pCursor)
SAFE_XFree
(
image
);
XColor
fg_color
=
{
.
red
=
pCursor
->
foreRed
,
.
green
=
pCursor
->
foreGreen
,
.
blue
=
pCursor
->
foreBlue
.
red
=
pCursor
->
foreRed
,
.
green
=
pCursor
->
foreGreen
,
.
blue
=
pCursor
->
foreBlue
,
};
XColor
bg_color
=
{
.
red
=
pCursor
->
backRed
,
.
green
=
pCursor
->
backGreen
,
.
blue
=
pCursor
->
backBlue
.
red
=
pCursor
->
backRed
,
.
green
=
pCursor
->
backGreen
,
.
blue
=
pCursor
->
backBlue
,
};
pCursor
->
devPriv
[
pScreen
->
myNum
]
=
(
void
*
)
malloc
(
sizeof
(
nxagentPrivCursor
));
...
...
@@ -275,15 +268,15 @@ void nxagentRecolorCursor(ScreenPtr pScreen, CursorPtr pCursor,
Bool
displayed
)
{
XColor
fg_color
=
{
.
red
=
pCursor
->
foreRed
,
.
green
=
pCursor
->
foreGreen
,
.
blue
=
pCursor
->
foreBlue
.
red
=
pCursor
->
foreRed
,
.
green
=
pCursor
->
foreGreen
,
.
blue
=
pCursor
->
foreBlue
,
};
XColor
bg_color
=
{
.
red
=
pCursor
->
backRed
,
.
green
=
pCursor
->
backGreen
,
.
blue
=
pCursor
->
backBlue
.
red
=
pCursor
->
backRed
,
.
green
=
pCursor
->
backGreen
,
.
blue
=
pCursor
->
backBlue
,
};
XRecolorCursor
(
nxagentDisplay
,
...
...
@@ -404,7 +397,7 @@ Bool nxagentReconnectAllCursor(void *p0)
fprintf
(
stderr
,
"nxagentReconnectAllCursor
\n
"
);
#endif
for
(
int
i
=
0
,
r
=
1
;
i
<
MAXCLIENTS
;
r
=
1
,
i
++
)
for
(
int
i
=
0
;
i
<
MAXCLIENTS
;
r
=
1
,
i
++
)
{
if
(
clients
[
i
])
{
...
...
@@ -514,7 +507,7 @@ Bool nxagentDisconnectAllCursor(void)
fprintf
(
stderr
,
"nxagentDisconnectAllCursor: Going to iterate through cursor resources.
\n
"
);
#endif
for
(
int
i
=
0
,
r
=
1
;
i
<
MAXCLIENTS
;
r
=
1
,
i
++
)
for
(
int
i
=
0
;
i
<
MAXCLIENTS
;
r
=
1
,
i
++
)
{
if
(
clients
[
i
])
{
...
...
@@ -558,9 +551,9 @@ void nxagentListCursor(void *p0, void *p1, void *p2)
void
nxagentListCursors
(
void
)
{
Bool
r
;
Bool
r
=
True
;
for
(
int
i
=
0
,
r
=
1
;
i
<
MAXCLIENTS
;
r
=
1
,
i
++
)
for
(
int
i
=
0
;
i
<
MAXCLIENTS
;
r
=
1
,
i
++
)
{
if
(
clients
[
i
])
{
...
...
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