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
c8d69eba
Unverified
Commit
c8d69eba
authored
Jan 30, 2020
by
Mike Gabriel
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'uli42-pr/fix_shadowed_vars' into 3.6.x
Attributes GH PR #895:
https://github.com/ArcticaProject/nx-libs/pull/895
parents
105cd2be
4821edfe
Hide whitespace changes
Inline
Side-by-side
Showing
31 changed files
with
159 additions
and
167 deletions
+159
-167
host.def
nx-X11/config/cf/host.def
+1
-1
xorg.cf
nx-X11/config/cf/xorg.cf
+2
-2
xorgsite.def
nx-X11/config/cf/xorgsite.def
+1
-1
cursor.c
nx-X11/programs/Xserver/dix/cursor.c
+1
-1
Client.c
nx-X11/programs/Xserver/hw/nxagent/Client.c
+1
-1
Clipboard.c
nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
+8
-6
Cursor.c
nx-X11/programs/Xserver/hw/nxagent/Cursor.c
+2
-2
Cursor.h
nx-X11/programs/Xserver/hw/nxagent/Cursor.h
+1
-1
Display.c
nx-X11/programs/Xserver/hw/nxagent/Display.c
+15
-16
Drawable.c
nx-X11/programs/Xserver/hw/nxagent/Drawable.c
+4
-6
Events.c
nx-X11/programs/Xserver/hw/nxagent/Events.c
+8
-7
Events.h
nx-X11/programs/Xserver/hw/nxagent/Events.h
+2
-2
Handlers.c
nx-X11/programs/Xserver/hw/nxagent/Handlers.c
+1
-1
Init.c
nx-X11/programs/Xserver/hw/nxagent/Init.c
+4
-4
Pixmap.c
nx-X11/programs/Xserver/hw/nxagent/Pixmap.c
+13
-5
Pixmaps.h
nx-X11/programs/Xserver/hw/nxagent/Pixmaps.h
+1
-1
Reconnect.c
nx-X11/programs/Xserver/hw/nxagent/Reconnect.c
+2
-1
Screen.c
nx-X11/programs/Xserver/hw/nxagent/Screen.c
+31
-31
Split.c
nx-X11/programs/Xserver/hw/nxagent/Split.c
+2
-2
Clean.c
nx-X11/programs/Xserver/hw/nxagent/compext/Clean.c
+12
-20
mibitblt.c
nx-X11/programs/Xserver/mi/mibitblt.c
+3
-3
mispans.c
nx-X11/programs/Xserver/mi/mispans.c
+4
-6
xdmauth.c
nx-X11/programs/Xserver/os/xdmauth.c
+9
-9
xdmcp.c
nx-X11/programs/Xserver/os/xdmcp.c
+12
-14
ddxList.c
nx-X11/programs/Xserver/xkb/ddxList.c
+0
-1
xkb.c
nx-X11/programs/Xserver/xkb/xkb.c
+10
-11
xkbActions.c
nx-X11/programs/Xserver/xkb/xkbActions.c
+5
-4
xkbLEDs.c
nx-X11/programs/Xserver/xkb/xkbLEDs.c
+2
-4
xkbPrKeyEv.c
nx-X11/programs/Xserver/xkb/xkbPrKeyEv.c
+2
-2
xkbtext.c
nx-X11/programs/Xserver/xkb/xkbtext.c
+0
-1
xkmread.c
nx-X11/programs/Xserver/xkb/xkmread.c
+0
-1
No files found.
nx-X11/config/cf/host.def
View file @
c8d69eba
...
@@ -230,7 +230,7 @@
...
@@ -230,7 +230,7 @@
*
*
#define GccWarningOptions -Wall -Wpedantic -Wpointer-arith -Wstrict-prototypes \
#define GccWarningOptions -Wall -Wpedantic -Wpointer-arith -Wstrict-prototypes \
-Wmissing-prototypes -Wmissing-declarations \
-Wmissing-prototypes -Wmissing-declarations \
-Wredundant-decls -Wnested-externs
-Wredundant-decls -Wnested-externs
-Wshadow
*/
*/
/*
/*
...
...
nx-X11/config/cf/xorg.cf
View file @
c8d69eba
...
@@ -720,9 +720,9 @@ XFREE86JAPANESEDOCDIR = $(DOCDIR)/Japanese
...
@@ -720,9 +720,9 @@ XFREE86JAPANESEDOCDIR = $(DOCDIR)/Japanese
# if XFree86Devel
# if XFree86Devel
# define GccWarningOptions -Wall -Wpedantic -Wpointer-arith -Wstrict-prototypes \
# define GccWarningOptions -Wall -Wpedantic -Wpointer-arith -Wstrict-prototypes \
-Wmissing-prototypes -Wmissing-declarations \
-Wmissing-prototypes -Wmissing-declarations \
-Wredundant-decls -Wnested-externs Gcc28Warnings
-Wredundant-decls -Wnested-externs
-Wshadow
Gcc28Warnings
# else
# else
# define GccWarningOptions -Wall -Wpedantic -Wpointer-arith Gcc28Warnings
# define GccWarningOptions -Wall -Wpedantic -Wpointer-arith
-Wshadow
Gcc28Warnings
# endif
# endif
# endif
# endif
# ifndef DefaultCCOptions
# ifndef DefaultCCOptions
...
...
nx-X11/config/cf/xorgsite.def
View file @
c8d69eba
...
@@ -113,7 +113,7 @@
...
@@ -113,7 +113,7 @@
*
*
#define GccWarningOptions -Wall -Wpedantic -Wpointer-arith -Wstrict-prototypes \
#define GccWarningOptions -Wall -Wpedantic -Wpointer-arith -Wstrict-prototypes \
-Wmissing-prototypes -Wmissing-declarations \
-Wmissing-prototypes -Wmissing-declarations \
-Wredundant-decls -Wnested-externs
-Wredundant-decls -Wnested-externs
-Wshadow
*/
*/
/*
/*
...
...
nx-X11/programs/Xserver/dix/cursor.c
View file @
c8d69eba
...
@@ -145,7 +145,7 @@ CheckForEmptyMask(CursorBitsPtr bits)
...
@@ -145,7 +145,7 @@ CheckForEmptyMask(CursorBitsPtr bits)
if
(
bits
->
argb
)
if
(
bits
->
argb
)
{
{
CARD32
*
argb
=
bits
->
argb
;
CARD32
*
argb
=
bits
->
argb
;
int
n
=
bits
->
width
*
bits
->
height
;
n
=
bits
->
width
*
bits
->
height
;
while
(
n
--
)
while
(
n
--
)
if
(
*
argb
++
&
0xff000000
)
return
;
if
(
*
argb
++
&
0xff000000
)
return
;
}
}
...
...
nx-X11/programs/Xserver/hw/nxagent/Client.c
View file @
c8d69eba
...
@@ -303,7 +303,7 @@ void nxagentWakeupByReset(ClientPtr client)
...
@@ -303,7 +303,7 @@ void nxagentWakeupByReset(ClientPtr client)
#ifndef WAIT_ALL_EVENTS
#ifndef WAIT_ALL_EVENTS
static
Bool
nxagentWaitWakeupBySplitPredicate
(
Display
*
disp
lay
,
XEvent
*
event
,
XPointer
ptr
)
static
Bool
nxagentWaitWakeupBySplitPredicate
(
Display
*
disp
,
XEvent
*
event
,
XPointer
ptr
)
{
{
return
(
event
->
type
==
ClientMessage
&&
return
(
event
->
type
==
ClientMessage
&&
(
event
->
xclient
.
data
.
l
[
0
]
==
NXNoSplitNotify
||
(
event
->
xclient
.
data
.
l
[
0
]
==
NXNoSplitNotify
||
...
...
nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
View file @
c8d69eba
...
@@ -1733,13 +1733,15 @@ int nxagentConvertSelection(ClientPtr client, WindowPtr pWin, Atom selection,
...
@@ -1733,13 +1733,15 @@ int nxagentConvertSelection(ClientPtr client, WindowPtr pWin, Atom selection,
return
0
;
return
0
;
}
}
int
i
=
nxagentFindCurrentSelectionIndex
(
selection
);
if
(
i
<
NumCurrentSelections
&&
IS_INTERNAL_OWNER
(
i
))
{
{
/*
int
i
=
nxagentFindCurrentSelectionIndex
(
selection
);
* There is a client owner on the agent side, let normal dix stuff happen.
if
(
i
<
NumCurrentSelections
&&
IS_INTERNAL_OWNER
(
i
))
*/
{
return
0
;
/*
* There is a client owner on the agent side, let normal dix stuff happen.
*/
return
0
;
}
}
}
/*
/*
...
...
nx-X11/programs/Xserver/hw/nxagent/Cursor.c
View file @
c8d69eba
...
@@ -487,7 +487,7 @@ void nxagentDisconnectCursor(void * p0, XID x1, void * p2)
...
@@ -487,7 +487,7 @@ void nxagentDisconnectCursor(void * p0, XID x1, void * p2)
}
}
}
}
Bool
nxagentDisconnectAllCursor
(
void
)
void
nxagentDisconnectAllCursor
(
void
)
{
{
Bool
r
=
True
;
Bool
r
=
True
;
...
@@ -518,7 +518,7 @@ Bool nxagentDisconnectAllCursor(void)
...
@@ -518,7 +518,7 @@ Bool nxagentDisconnectAllCursor(void)
nxagentDisconnectCursor
(
grab
->
cursor
,
0
,
&
r
);
nxagentDisconnectCursor
(
grab
->
cursor
,
0
,
&
r
);
}
}
return
r
;
return
;
}
}
...
...
nx-X11/programs/Xserver/hw/nxagent/Cursor.h
View file @
c8d69eba
...
@@ -112,6 +112,6 @@ void nxagentDisconnectCursor(void * p0, XID x1, void * p2);
...
@@ -112,6 +112,6 @@ void nxagentDisconnectCursor(void * p0, XID x1, void * p2);
void
nxagentReconnectCursor
(
void
*
p0
,
XID
x1
,
void
*
p2
);
void
nxagentReconnectCursor
(
void
*
p0
,
XID
x1
,
void
*
p2
);
void
nxagentReDisplayCurrentCursor
(
void
);
void
nxagentReDisplayCurrentCursor
(
void
);
Bool
nxagentReconnectAllCursor
(
void
*
p0
);
Bool
nxagentReconnectAllCursor
(
void
*
p0
);
Bool
nxagentDisconnectAllCursor
(
void
);
void
nxagentDisconnectAllCursor
(
void
);
#endif
/* __Cursor_H__ */
#endif
/* __Cursor_H__ */
nx-X11/programs/Xserver/hw/nxagent/Display.c
View file @
c8d69eba
...
@@ -110,7 +110,7 @@ Bool nxagentTrue24 = False;
...
@@ -110,7 +110,7 @@ Bool nxagentTrue24 = False;
int
nxagentNumVisuals
;
int
nxagentNumVisuals
;
int
nxagentXConnectionNumber
;
int
nxagentXConnectionNumber
;
int
nxagentIOErrorHandler
(
Display
*
disp
lay
);
int
nxagentIOErrorHandler
(
Display
*
disp
);
static
Bool
nxagentDisplayInfoSaved
=
False
;
static
Bool
nxagentDisplayInfoSaved
=
False
;
static
Display
*
nxagentDisplayBackup
=
NULL
;
static
Display
*
nxagentDisplayBackup
=
NULL
;
...
@@ -170,7 +170,7 @@ Pixmap nxagentIconPixmap;
...
@@ -170,7 +170,7 @@ Pixmap nxagentIconPixmap;
Pixmap
nxagentIconShape
;
Pixmap
nxagentIconShape
;
Bool
useXpmIcon
=
False
;
Bool
useXpmIcon
=
False
;
Bool
nxagentMakeIcon
(
Display
*
disp
lay
,
Pixmap
*
nxIcon
,
Pixmap
*
nxMask
);
Bool
nxagentMakeIcon
(
Display
*
disp
,
Pixmap
*
nxIcon
,
Pixmap
*
nxMask
);
static
void
nxagentInitVisuals
(
void
);
static
void
nxagentInitVisuals
(
void
);
...
@@ -188,7 +188,7 @@ static int nxagentCheckForColormapsCompatibility(int flexibility);
...
@@ -188,7 +188,7 @@ static int nxagentCheckForColormapsCompatibility(int flexibility);
* Save Internal implementation Also called in Reconnect.c.
* Save Internal implementation Also called in Reconnect.c.
*/
*/
Display
*
nxagentInternalOpenDisplay
(
char
*
disp
lay
);
Display
*
nxagentInternalOpenDisplay
(
char
*
disp
);
#ifdef NXAGENT_TIMESTAMP
#ifdef NXAGENT_TIMESTAMP
unsigned
long
startTime
;
unsigned
long
startTime
;
...
@@ -226,7 +226,7 @@ int nxagentServerOrder(void)
...
@@ -226,7 +226,7 @@ int nxagentServerOrder(void)
* be probably moved to Handlers.c.
* be probably moved to Handlers.c.
*/
*/
int
nxagentIOErrorHandler
(
Display
*
disp
lay
)
int
nxagentIOErrorHandler
(
Display
*
disp
)
{
{
#ifdef TEST
#ifdef TEST
fprintf
(
stderr
,
"nxagentIOErrorHandler: Got I/O error with nxagentException.ioError [%d].
\n
"
,
fprintf
(
stderr
,
"nxagentIOErrorHandler: Got I/O error with nxagentException.ioError [%d].
\n
"
,
...
@@ -559,7 +559,7 @@ static void nxagentSigchldHandler(int signal)
...
@@ -559,7 +559,7 @@ static void nxagentSigchldHandler(int signal)
return
;
return
;
}
}
Display
*
nxagentInternalOpenDisplay
(
char
*
disp
lay
)
Display
*
nxagentInternalOpenDisplay
(
char
*
disp
)
{
{
/*
/*
* Stop the smart schedule timer since it uses SIGALRM as we do.
* Stop the smart schedule timer since it uses SIGALRM as we do.
...
@@ -601,10 +601,10 @@ FIXME: Should print a warning if the user tries to let the agent
...
@@ -601,10 +601,10 @@ FIXME: Should print a warning if the user tries to let the agent
#ifdef TEST
#ifdef TEST
fprintf
(
stderr
,
"nxagentInternalOpenDisplay: Going to open the display [%s].
\n
"
,
fprintf
(
stderr
,
"nxagentInternalOpenDisplay: Going to open the display [%s].
\n
"
,
disp
lay
);
disp
);
#endif
#endif
Display
*
newDisplay
=
XOpenDisplay
(
disp
lay
);
Display
*
newDisplay
=
XOpenDisplay
(
disp
);
alarm
(
0
);
alarm
(
0
);
...
@@ -630,7 +630,7 @@ FIXME: Should print a warning if the user tries to let the agent
...
@@ -630,7 +630,7 @@ FIXME: Should print a warning if the user tries to let the agent
return
newDisplay
;
return
newDisplay
;
}
}
static
void
nxagentDisplayBlockHandler
(
Display
*
disp
lay
,
int
reason
)
static
void
nxagentDisplayBlockHandler
(
Display
*
disp
,
int
reason
)
{
{
if
(
nxagentDisplay
!=
NULL
)
if
(
nxagentDisplay
!=
NULL
)
{
{
...
@@ -686,7 +686,7 @@ static void nxagentDisplayBlockHandler(Display *display, int reason)
...
@@ -686,7 +686,7 @@ static void nxagentDisplayBlockHandler(Display *display, int reason)
}
}
}
}
static
void
nxagentDisplayWriteHandler
(
Display
*
disp
lay
,
int
length
)
static
void
nxagentDisplayWriteHandler
(
Display
*
disp
,
int
length
)
{
{
if
(
nxagentDisplay
!=
NULL
)
if
(
nxagentDisplay
!=
NULL
)
{
{
...
@@ -717,7 +717,7 @@ int nxagentGetDataRate(void)
...
@@ -717,7 +717,7 @@ int nxagentGetDataRate(void)
return
nxagentRate
;
return
nxagentRate
;
}
}
static
void
nxagentDisplayFlushHandler
(
Display
*
disp
lay
,
int
length
)
static
void
nxagentDisplayFlushHandler
(
Display
*
disp
,
int
length
)
{
{
if
(
nxagentDisplay
!=
NULL
)
if
(
nxagentDisplay
!=
NULL
)
{
{
...
@@ -768,7 +768,7 @@ static void nxagentDisplayFlushHandler(Display *display, int length)
...
@@ -768,7 +768,7 @@ static void nxagentDisplayFlushHandler(Display *display, int length)
* rupt was received or if any other event occurred mandating the
* rupt was received or if any other event occurred mandating the
+ end of the session."
+ end of the session."
*/
*/
static
int
nxagentDisplayErrorPredicate
(
Display
*
disp
lay
,
int
error
)
static
int
nxagentDisplayErrorPredicate
(
Display
*
disp
,
int
error
)
{
{
#ifdef TEST
#ifdef TEST
fprintf
(
stderr
,
"nxagentDisplayErrorPredicate: CHECK! Error is [%d] with [%d][%d][%d][%d][%d].
\n
"
,
fprintf
(
stderr
,
"nxagentDisplayErrorPredicate: CHECK! Error is [%d] with [%d][%d][%d][%d][%d].
\n
"
,
...
@@ -789,7 +789,7 @@ static int nxagentDisplayErrorPredicate(Display *display, int error)
...
@@ -789,7 +789,7 @@ static int nxagentDisplayErrorPredicate(Display *display, int error)
else
if
(
nxagentException
.
sigHup
>
0
||
else
if
(
nxagentException
.
sigHup
>
0
||
nxagentException
.
ioError
>
0
)
nxagentException
.
ioError
>
0
)
{
{
NXForceDisplayError
(
disp
lay
);
NXForceDisplayError
(
disp
);
return
1
;
return
1
;
}
}
...
@@ -1746,7 +1746,7 @@ FIXME: Is this needed?
...
@@ -1746,7 +1746,7 @@ FIXME: Is this needed?
nxagentDisplay
=
NULL
;
nxagentDisplay
=
NULL
;
}
}
Bool
nxagentMakeIcon
(
Display
*
disp
lay
,
Pixmap
*
nxIcon
,
Pixmap
*
nxMask
)
Bool
nxagentMakeIcon
(
Display
*
disp
,
Pixmap
*
nxIcon
,
Pixmap
*
nxMask
)
{
{
char
**
agentIconData
;
char
**
agentIconData
;
...
@@ -1764,8 +1764,8 @@ Bool nxagentMakeIcon(Display *display, Pixmap *nxIcon, Pixmap *nxMask)
...
@@ -1764,8 +1764,8 @@ Bool nxagentMakeIcon(Display *display, Pixmap *nxIcon, Pixmap *nxMask)
XlibPixmap
IconPixmap
;
XlibPixmap
IconPixmap
;
XlibPixmap
IconShape
;
XlibPixmap
IconShape
;
if
(
XpmSuccess
==
XpmCreatePixmapFromData
(
disp
lay
,
if
(
XpmSuccess
==
XpmCreatePixmapFromData
(
disp
,
DefaultRootWindow
(
disp
lay
),
DefaultRootWindow
(
disp
),
agentIconData
,
agentIconData
,
&
IconPixmap
,
&
IconPixmap
,
&
IconShape
,
&
IconShape
,
...
@@ -2255,7 +2255,6 @@ static int nxagentInitAndCheckVisuals(int flexibility)
...
@@ -2255,7 +2255,6 @@ static int nxagentInitAndCheckVisuals(int flexibility)
{
{
/* FIXME: does this also need work? */
/* FIXME: does this also need work? */
bool
matched
;
bool
compatible
=
true
;
bool
compatible
=
true
;
long
viMask
=
VisualScreenMask
;
long
viMask
=
VisualScreenMask
;
...
...
nx-X11/programs/Xserver/hw/nxagent/Drawable.c
View file @
c8d69eba
...
@@ -405,7 +405,7 @@ int nxagentSynchronizeRegion(DrawablePtr pDrawable, RegionPtr pRegion, unsigned
...
@@ -405,7 +405,7 @@ int nxagentSynchronizeRegion(DrawablePtr pDrawable, RegionPtr pRegion, unsigned
RegionNumRects
(
nxagentCorruptedRegion
((
DrawablePtr
)
nxagentDrawableBitmap
(
pDrawable
))));
RegionNumRects
(
nxagentCorruptedRegion
((
DrawablePtr
)
nxagentDrawableBitmap
(
pDrawable
))));
#endif
#endif
RegionPtr
clipRegion
=
nxagentCreateRegion
(
pDrawable
,
NULL
,
0
,
0
,
pDrawable
->
width
,
pDrawable
->
height
);
clipRegion
=
nxagentCreateRegion
(
pDrawable
,
NULL
,
0
,
0
,
pDrawable
->
width
,
pDrawable
->
height
);
/*
/*
* Intersecting the viewable region of the drawable with the
* Intersecting the viewable region of the drawable with the
...
@@ -2261,11 +2261,11 @@ void nxagentPointsToDirtyRegion(DrawablePtr pDrawable, int mode,
...
@@ -2261,11 +2261,11 @@ void nxagentPointsToDirtyRegion(DrawablePtr pDrawable, int mode,
{
{
RegionPtr
pRegion
=
RegionCreate
(
NullBox
,
1
);
RegionPtr
pRegion
=
RegionCreate
(
NullBox
,
1
);
int
np
=
nPoints
;
xPoint
*
xp
=
pPoints
;
while
(
np
--
)
for
(
int
np
=
nPoints
;
np
--
;
xp
++
)
{
{
BoxRec
box
;
BoxRec
box
;
xPoint
*
xp
=
pPoints
;
if
(
CoordModePrevious
)
if
(
CoordModePrevious
)
{
{
...
@@ -2294,8 +2294,6 @@ void nxagentPointsToDirtyRegion(DrawablePtr pDrawable, int mode,
...
@@ -2294,8 +2294,6 @@ void nxagentPointsToDirtyRegion(DrawablePtr pDrawable, int mode,
RegionUnion
(
pRegion
,
pRegion
,
&
tmpRegion
);
RegionUnion
(
pRegion
,
pRegion
,
&
tmpRegion
);
RegionUninit
(
&
tmpRegion
);
RegionUninit
(
&
tmpRegion
);
xp
++
;
}
}
BoxRec
extents
=
*
RegionExtents
(
pRegion
);
BoxRec
extents
=
*
RegionExtents
(
pRegion
);
...
...
nx-X11/programs/Xserver/hw/nxagent/Events.c
View file @
c8d69eba
...
@@ -167,7 +167,7 @@ void nxagentHandleCollectPropertyEvent(XEvent*);
...
@@ -167,7 +167,7 @@ void nxagentHandleCollectPropertyEvent(XEvent*);
void
nxagentHandleCollectGrabPointerEvent
(
int
resource
);
void
nxagentHandleCollectGrabPointerEvent
(
int
resource
);
Bool
nxagentCollectGrabPointerPredicate
(
Display
*
disp
lay
,
XEvent
*
X
,
XPointer
ptr
);
Bool
nxagentCollectGrabPointerPredicate
(
Display
*
disp
,
XEvent
*
X
,
XPointer
ptr
);
/*
/*
* Used in Handlers.c to synchronize the agent with the remote X
* Used in Handlers.c to synchronize the agent with the remote X
...
@@ -702,7 +702,7 @@ static void nxagentToggleAutoGrab(void)
...
@@ -702,7 +702,7 @@ static void nxagentToggleAutoGrab(void)
nxagentDisableAutoGrab
();
nxagentDisableAutoGrab
();
}
}
static
Bool
nxagentExposurePredicate
(
Display
*
disp
lay
,
XEvent
*
event
,
XPointer
window
)
static
Bool
nxagentExposurePredicate
(
Display
*
disp
,
XEvent
*
event
,
XPointer
window
)
{
{
/*
/*
* Handle both Expose and ProcessedExpose events. The latters are
* Handle both Expose and ProcessedExpose events. The latters are
...
@@ -720,12 +720,12 @@ static Bool nxagentExposurePredicate(Display *display, XEvent *event, XPointer w
...
@@ -720,12 +720,12 @@ static Bool nxagentExposurePredicate(Display *display, XEvent *event, XPointer w
}
}
}
}
static
int
nxagentAnyEventPredicate
(
Display
*
disp
lay
,
XEvent
*
event
,
XPointer
parameter
)
static
int
nxagentAnyEventPredicate
(
Display
*
disp
,
XEvent
*
event
,
XPointer
parameter
)
{
{
return
1
;
return
1
;
}
}
int
nxagentInputEventPredicate
(
Display
*
disp
lay
,
XEvent
*
event
,
XPointer
parameter
)
int
nxagentInputEventPredicate
(
Display
*
disp
,
XEvent
*
event
,
XPointer
parameter
)
{
{
switch
(
event
->
type
)
switch
(
event
->
type
)
{
{
...
@@ -1238,7 +1238,7 @@ FIXME: Don't enqueue the KeyRelease event if the key was not already
...
@@ -1238,7 +1238,7 @@ FIXME: Don't enqueue the KeyRelease event if the key was not already
int
resource
=
nxagentWaitForResource
(
NXGetCollectGrabPointerResource
,
int
resource
=
nxagentWaitForResource
(
NXGetCollectGrabPointerResource
,
nxagentCollectGrabPointerPredicate
);
nxagentCollectGrabPointerPredicate
);
ScreenPtr
pScreen
=
nxagentScreen
(
X
.
xbutton
.
window
);
pScreen
=
nxagentScreen
(
X
.
xbutton
.
window
);
viewportCursor
=
XCreateFontCursor
(
nxagentDisplay
,
XC_fleur
);
viewportCursor
=
XCreateFontCursor
(
nxagentDisplay
,
XC_fleur
);
NXCollectGrabPointer
(
nxagentDisplay
,
resource
,
NXCollectGrabPointer
(
nxagentDisplay
,
resource
,
...
@@ -1380,7 +1380,7 @@ FIXME: Don't enqueue the KeyRelease event if the key was not already
...
@@ -1380,7 +1380,7 @@ FIXME: Don't enqueue the KeyRelease event if the key was not already
}
}
case
MotionNotify
:
case
MotionNotify
:
{
{
ScreenPtr
pScreen
=
nxagentScreen
(
X
.
xmotion
.
window
);
pScreen
=
nxagentScreen
(
X
.
xmotion
.
window
);
#ifdef TEST
#ifdef TEST
fprintf
(
stderr
,
"%s: Going to handle new MotionNotify event.
\n
"
,
__func__
);
fprintf
(
stderr
,
"%s: Going to handle new MotionNotify event.
\n
"
,
__func__
);
...
@@ -1593,6 +1593,7 @@ FIXME: Don't enqueue the KeyRelease event if the key was not already
...
@@ -1593,6 +1593,7 @@ FIXME: Don't enqueue the KeyRelease event if the key was not already
{
{
for
(
int
k
=
0
;
k
<
8
;
k
++
)
for
(
int
k
=
0
;
k
<
8
;
k
++
)
{
{
if
(
val
&
(
1
<<
k
))
{
{
#ifdef NXAGENT_FIXKEYS_DEBUG
#ifdef NXAGENT_FIXKEYS_DEBUG
fprintf
(
stderr
,
"sending KeyRelease event for keycode: %x
\n
"
,
fprintf
(
stderr
,
"sending KeyRelease event for keycode: %x
\n
"
,
...
@@ -3882,7 +3883,7 @@ void nxagentDeactivatePointerGrab(void)
...
@@ -3882,7 +3883,7 @@ void nxagentDeactivatePointerGrab(void)
}
}
}
}
Bool
nxagentCollectGrabPointerPredicate
(
Display
*
disp
lay
,
XEvent
*
X
,
XPointer
ptr
)
Bool
nxagentCollectGrabPointerPredicate
(
Display
*
disp
,
XEvent
*
X
,
XPointer
ptr
)
{
{
return
(
X
->
xclient
.
window
==
0
&&
return
(
X
->
xclient
.
window
==
0
&&
X
->
xclient
.
message_type
==
0
&&
X
->
xclient
.
message_type
==
0
&&
...
...
nx-X11/programs/Xserver/hw/nxagent/Events.h
View file @
c8d69eba
...
@@ -68,9 +68,9 @@ typedef int (*GetResourceFuncPtr)(Display*);
...
@@ -68,9 +68,9 @@ typedef int (*GetResourceFuncPtr)(Display*);
int
nxagentWaitForResource
(
GetResourceFuncPtr
,
PredicateFuncPtr
);
int
nxagentWaitForResource
(
GetResourceFuncPtr
,
PredicateFuncPtr
);
Bool
nxagentCollectGrabPointerPredicate
(
Display
*
disp
lay
,
XEvent
*
X
,
XPointer
ptr
);
Bool
nxagentCollectGrabPointerPredicate
(
Display
*
disp
,
XEvent
*
X
,
XPointer
ptr
);
int
nxagentInputEventPredicate
(
Display
*
disp
lay
,
XEvent
*
event
,
XPointer
parameter
);
int
nxagentInputEventPredicate
(
Display
*
disp
,
XEvent
*
event
,
XPointer
parameter
);
/*
/*
* Enable and disable notification of
* Enable and disable notification of
...
...
nx-X11/programs/Xserver/hw/nxagent/Handlers.c
View file @
c8d69eba
...
@@ -941,7 +941,7 @@ void nxagentHandleCollectInputFocusEvent(int resource)
...
@@ -941,7 +941,7 @@ void nxagentHandleCollectInputFocusEvent(int resource)
#endif
#endif
}
}
Bool
nxagentCollectInputFocusPredicate
(
Display
*
disp
lay
,
XEvent
*
X
,
XPointer
ptr
)
Bool
nxagentCollectInputFocusPredicate
(
Display
*
disp
,
XEvent
*
X
,
XPointer
ptr
)
{
{
return
(
X
->
xclient
.
window
==
0
&&
return
(
X
->
xclient
.
window
==
0
&&
X
->
xclient
.
message_type
==
0
&&
X
->
xclient
.
message_type
==
0
&&
...
...
nx-X11/programs/Xserver/hw/nxagent/Init.c
View file @
c8d69eba
...
@@ -203,7 +203,7 @@ void checkX2goAgent(void)
...
@@ -203,7 +203,7 @@ void checkX2goAgent(void)
/*
/*
* Called at X server's initialization.
* Called at X server's initialization.
*/
*/
void
InitOutput
(
ScreenInfo
*
scr
een
Info
,
int
argc
,
char
*
argv
[])
void
InitOutput
(
ScreenInfo
*
scrInfo
,
int
argc
,
char
*
argv
[])
{
{
/*
/*
* Print our pid and version information.
* Print our pid and version information.
...
@@ -329,13 +329,13 @@ FIXME: These variables, if not removed at all because have probably
...
@@ -329,13 +329,13 @@ FIXME: These variables, if not removed at all because have probably
* Initialize the basic screen info.
* Initialize the basic screen info.
*/
*/
nxagentSetScreenInfo
(
scr
een
Info
);
nxagentSetScreenInfo
(
scrInfo
);
/*
/*
* Initialize pixmap formats for this screen.
* Initialize pixmap formats for this screen.
*/
*/
nxagentSetPixmapFormats
(
scr
een
Info
);
nxagentSetPixmapFormats
(
scrInfo
);
/*
/*
* Get our own privates' index.
* Get our own privates' index.
...
@@ -370,7 +370,7 @@ FIXME: These variables, if not removed at all because have probably
...
@@ -370,7 +370,7 @@ FIXME: These variables, if not removed at all because have probably
AddScreen
(
nxagentOpenScreen
,
argc
,
argv
);
AddScreen
(
nxagentOpenScreen
,
argc
,
argv
);
}
}
nxagentNumScreens
=
scr
een
Info
->
numScreens
;
nxagentNumScreens
=
scrInfo
->
numScreens
;
/*
/*
* Initialize the GCs used by the synchronization put images. We do
* Initialize the GCs used by the synchronization put images. We do
...
...
nx-X11/programs/Xserver/hw/nxagent/Pixmap.c
View file @
c8d69eba
...
@@ -647,9 +647,9 @@ void nxagentDisconnectPixmap(void *p0, XID x1, void *p2)
...
@@ -647,9 +647,9 @@ void nxagentDisconnectPixmap(void *p0, XID x1, void *p2)
}
}
}
}
Bool
nxagentDisconnectAllPixmaps
(
void
)
void
nxagentDisconnectAllPixmaps
(
void
)
{
{
int
r
=
1
;
int
r
;
#ifdef TEST
#ifdef TEST
fprintf
(
stderr
,
"nxagentDisconnectAllPixmaps: Going to iterate through pixmap resources.
\n
"
);
fprintf
(
stderr
,
"nxagentDisconnectAllPixmaps: Going to iterate through pixmap resources.
\n
"
);
...
@@ -661,6 +661,7 @@ Bool nxagentDisconnectAllPixmaps(void)
...
@@ -661,6 +661,7 @@ Bool nxagentDisconnectAllPixmaps(void)
* too.
* too.
*/
*/
r
=
1
;
FindClientResourcesByType
(
clients
[
serverClient
->
index
],
RT_NX_PIXMAP
,
nxagentDisconnectPixmap
,
&
r
);
FindClientResourcesByType
(
clients
[
serverClient
->
index
],
RT_NX_PIXMAP
,
nxagentDisconnectPixmap
,
&
r
);
#ifdef WARNING
#ifdef WARNING
...
@@ -674,7 +675,7 @@ Bool nxagentDisconnectAllPixmaps(void)
...
@@ -674,7 +675,7 @@ Bool nxagentDisconnectAllPixmaps(void)
#endif
#endif
for
(
int
i
=
0
,
r
=
1
;
i
<
MAXCLIENTS
;
r
=
1
,
i
++
)
for
(
int
i
=
0
;
i
<
MAXCLIENTS
;
i
++
)
{
{
if
(
clients
[
i
])
if
(
clients
[
i
])
{
{
...
@@ -682,6 +683,7 @@ Bool nxagentDisconnectAllPixmaps(void)
...
@@ -682,6 +683,7 @@ Bool nxagentDisconnectAllPixmaps(void)
fprintf
(
stderr
,
"nxagentDisconnectAllPixmaps: Going to disconnect pixmaps of client [%d].
\n
"
,
i
);
fprintf
(
stderr
,
"nxagentDisconnectAllPixmaps: Going to disconnect pixmaps of client [%d].
\n
"
,
i
);
#endif
#endif
r
=
1
;
FindClientResourcesByType
(
clients
[
i
],
RT_PIXMAP
,
nxagentDisconnectPixmap
,
&
r
);
FindClientResourcesByType
(
clients
[
i
],
RT_PIXMAP
,
nxagentDisconnectPixmap
,
&
r
);
#ifdef WARNING
#ifdef WARNING
...
@@ -701,7 +703,7 @@ Bool nxagentDisconnectAllPixmaps(void)
...
@@ -701,7 +703,7 @@ Bool nxagentDisconnectAllPixmaps(void)
fprintf
(
stderr
,
"nxagentDisconnectAllPixmaps: Pixmaps disconnection completed.
\n
"
);
fprintf
(
stderr
,
"nxagentDisconnectAllPixmaps: Pixmaps disconnection completed.
\n
"
);
#endif
#endif
return
r
;
return
;
}
}
void
nxagentReconnectPixmap
(
void
*
p0
,
XID
x1
,
void
*
p2
)
void
nxagentReconnectPixmap
(
void
*
p0
,
XID
x1
,
void
*
p2
)
...
@@ -837,7 +839,13 @@ Bool nxagentReconnectAllPixmaps(void *p0)
...
@@ -837,7 +839,13 @@ Bool nxagentReconnectAllPixmaps(void *p0)
#endif
#endif
for
(
int
i
=
0
,
result
=
1
;
i
<
MAXCLIENTS
;
result
=
1
,
i
++
)
/*
* FIXME: This is a bit cumbersome: at the end of each iteration
* result will be reset to 1. Therefore at loop exit result will
* always be 1 meaning the whole function will always return 1...
*/
result
=
1
;
for
(
int
i
=
0
;
i
<
MAXCLIENTS
;
result
=
1
,
i
++
)
{
{
if
(
clients
[
i
]
!=
NULL
)
if
(
clients
[
i
]
!=
NULL
)
{
{
...
...
nx-X11/programs/Xserver/hw/nxagent/Pixmaps.h
View file @
c8d69eba
...
@@ -132,7 +132,7 @@ RegionPtr nxagentCreateRegion(DrawablePtr pDrawable, GCPtr pGC, int x, int y,
...
@@ -132,7 +132,7 @@ RegionPtr nxagentCreateRegion(DrawablePtr pDrawable, GCPtr pGC, int x, int y,
void
nxagentReconnectPixmap
(
void
*
p0
,
XID
x1
,
void
*
p2
);
void
nxagentReconnectPixmap
(
void
*
p0
,
XID
x1
,
void
*
p2
);
Bool
nxagentReconnectAllPixmaps
(
void
*
p0
);
Bool
nxagentReconnectAllPixmaps
(
void
*
p0
);
void
nxagentDisconnectPixmap
(
void
*
p0
,
XID
x1
,
void
*
p2
);
void
nxagentDisconnectPixmap
(
void
*
p0
,
XID
x1
,
void
*
p2
);
Bool
nxagentDisconnectAllPixmaps
(
void
);
void
nxagentDisconnectAllPixmaps
(
void
);
int
nxagentDestroyNewPixmapResourceType
(
void
*
p
,
XID
id
);
int
nxagentDestroyNewPixmapResourceType
(
void
*
p
,
XID
id
);
...
...
nx-X11/programs/Xserver/hw/nxagent/Reconnect.c
View file @
c8d69eba
...
@@ -83,7 +83,7 @@ extern Bool nxagentReconnectAllPicture(void*);
...
@@ -83,7 +83,7 @@ extern Bool nxagentReconnectAllPicture(void*);
extern
Bool
nxagentDisconnectAllPicture
(
void
);
extern
Bool
nxagentDisconnectAllPicture
(
void
);
extern
Bool
nxagentDisconnectAllWindows
(
void
);
extern
Bool
nxagentDisconnectAllWindows
(
void
);
extern
Bool
nxagentDisconnectAllCursor
(
void
);
extern
void
nxagentDisconnectAllCursor
(
void
);
extern
Bool
nxagentReconnectFailedFonts
(
void
*
);
extern
Bool
nxagentReconnectFailedFonts
(
void
*
);
extern
Bool
nxagentInstallFontServerPath
(
void
);
extern
Bool
nxagentInstallFontServerPath
(
void
);
...
@@ -519,6 +519,7 @@ Bool nxagentReconnectSession(void)
...
@@ -519,6 +519,7 @@ Bool nxagentReconnectSession(void)
nxagentEmptyBSPixmapList
();
nxagentEmptyBSPixmapList
();
/* FIXME: nxagentReconnectAllPixmaps will always return 1 */
if
(
nxagentReconnectAllPixmaps
(
reconnectLossyLevel
[
PIXMAP_STEP
])
==
0
)
if
(
nxagentReconnectAllPixmaps
(
reconnectLossyLevel
[
PIXMAP_STEP
])
==
0
)
{
{
failedStep
=
PIXMAP_STEP
;
failedStep
=
PIXMAP_STEP
;
...
...
nx-X11/programs/Xserver/hw/nxagent/Screen.c
View file @
c8d69eba
...
@@ -236,7 +236,7 @@ int nxagentBitsPerPixel(int depth)
...
@@ -236,7 +236,7 @@ int nxagentBitsPerPixel(int depth)
else
return
32
;
else
return
32
;
}
}
void
nxagentSetScreenInfo
(
ScreenInfo
*
scr
een
Info
)
void
nxagentSetScreenInfo
(
ScreenInfo
*
scrInfo
)
{
{
/*
/*
* Setup global screen info parameters. In the Xnest
* Setup global screen info parameters. In the Xnest
...
@@ -248,34 +248,34 @@ void nxagentSetScreenInfo(ScreenInfo *screenInfo)
...
@@ -248,34 +248,34 @@ void nxagentSetScreenInfo(ScreenInfo *screenInfo)
*
*
* From a standard implementation:
* From a standard implementation:
*
*
* scr
een
Info->imageByteOrder = IMAGE_BYTE_ORDER;
* scrInfo->imageByteOrder = IMAGE_BYTE_ORDER;
* scr
een
Info->bitmapScanlinePad = BITMAP_SCANLINE_PAD;
* scrInfo->bitmapScanlinePad = BITMAP_SCANLINE_PAD;
* scr
een
Info->bitmapScanlineUnit = BITMAP_SCANLINE_UNIT;
* scrInfo->bitmapScanlineUnit = BITMAP_SCANLINE_UNIT;
* scr
een
Info->bitmapBitOrder = BITMAP_BIT_ORDER;
* scrInfo->bitmapBitOrder = BITMAP_BIT_ORDER;
*
*
* From Xnest implementation:
* From Xnest implementation:
*
*
* scr
een
Info -> imageByteOrder = ImageByteOrder(nxagentDisplay);
* scrInfo -> imageByteOrder = ImageByteOrder(nxagentDisplay);
* scr
een
Info -> bitmapScanlineUnit = BitmapUnit(nxagentDisplay);
* scrInfo -> bitmapScanlineUnit = BitmapUnit(nxagentDisplay);
* scr
een
Info -> bitmapScanlinePad = BitmapPad(nxagentDisplay);
* scrInfo -> bitmapScanlinePad = BitmapPad(nxagentDisplay);
* scr
een
Info -> bitmapBitOrder = BitmapBitOrder(nxagentDisplay);
* scrInfo -> bitmapBitOrder = BitmapBitOrder(nxagentDisplay);
*/
*/
scr
een
Info
->
imageByteOrder
=
IMAGE_BYTE_ORDER
;
scrInfo
->
imageByteOrder
=
IMAGE_BYTE_ORDER
;
scr
een
Info
->
bitmapScanlinePad
=
BITMAP_SCANLINE_PAD
;
scrInfo
->
bitmapScanlinePad
=
BITMAP_SCANLINE_PAD
;
scr
een
Info
->
bitmapScanlineUnit
=
BITMAP_SCANLINE_UNIT
;
scrInfo
->
bitmapScanlineUnit
=
BITMAP_SCANLINE_UNIT
;
scr
een
Info
->
bitmapBitOrder
=
BITMAP_BIT_ORDER
;
scrInfo
->
bitmapBitOrder
=
BITMAP_BIT_ORDER
;
#ifdef TEST
#ifdef TEST
fprintf
(
stderr
,
"nxagentSetScreenInfo: Server image order is [%d] bitmap order is [%d].
\n
"
,
fprintf
(
stderr
,
"nxagentSetScreenInfo: Server image order is [%d] bitmap order is [%d].
\n
"
,
scr
eenInfo
->
imageByteOrder
,
screen
Info
->
bitmapBitOrder
);
scr
Info
->
imageByteOrder
,
scr
Info
->
bitmapBitOrder
);
fprintf
(
stderr
,
"nxagentSetScreenInfo: Server scanline unit is [%d] scanline pad is [%d].
\n
"
,
fprintf
(
stderr
,
"nxagentSetScreenInfo: Server scanline unit is [%d] scanline pad is [%d].
\n
"
,
scr
eenInfo
->
bitmapScanlineUnit
,
screen
Info
->
bitmapScanlinePad
);
scr
Info
->
bitmapScanlineUnit
,
scr
Info
->
bitmapScanlinePad
);
#endif
#endif
}
}
void
nxagentSetPixmapFormats
(
ScreenInfo
*
scr
een
Info
)
void
nxagentSetPixmapFormats
(
ScreenInfo
*
scrInfo
)
{
{
/*
/*
* Formats are created with no care of which are supported
* Formats are created with no care of which are supported
...
@@ -284,19 +284,19 @@ void nxagentSetPixmapFormats(ScreenInfo *screenInfo)
...
@@ -284,19 +284,19 @@ void nxagentSetPixmapFormats(ScreenInfo *screenInfo)
* of session from a display to another.
* of session from a display to another.
*/
*/
scr
een
Info
->
numPixmapFormats
=
nxagentNumPixmapFormats
;
scrInfo
->
numPixmapFormats
=
nxagentNumPixmapFormats
;
for
(
int
i
=
0
;
i
<
nxagentNumPixmapFormats
;
i
++
)
for
(
int
i
=
0
;
i
<
nxagentNumPixmapFormats
;
i
++
)
{
{
scr
een
Info
->
formats
[
i
].
depth
=
nxagentPixmapFormats
[
i
].
depth
;
scrInfo
->
formats
[
i
].
depth
=
nxagentPixmapFormats
[
i
].
depth
;
scr
een
Info
->
formats
[
i
].
bitsPerPixel
=
nxagentPixmapFormats
[
i
].
bits_per_pixel
;
scrInfo
->
formats
[
i
].
bitsPerPixel
=
nxagentPixmapFormats
[
i
].
bits_per_pixel
;
scr
een
Info
->
formats
[
i
].
scanlinePad
=
nxagentPixmapFormats
[
i
].
scanline_pad
;
scrInfo
->
formats
[
i
].
scanlinePad
=
nxagentPixmapFormats
[
i
].
scanline_pad
;
#ifdef TEST
#ifdef TEST
fprintf
(
stderr
,
"nxagentSetPixmapFormats: Set format at index [%d] to depth [%d] "
fprintf
(
stderr
,
"nxagentSetPixmapFormats: Set format at index [%d] to depth [%d] "
"bits per pixel [%d] scanline pad [%d].
\n
"
,
i
,
"bits per pixel [%d] scanline pad [%d].
\n
"
,
i
,
scr
eenInfo
->
formats
[
i
].
depth
,
screen
Info
->
formats
[
i
].
bitsPerPixel
,
scr
Info
->
formats
[
i
].
depth
,
scr
Info
->
formats
[
i
].
bitsPerPixel
,
scr
een
Info
->
formats
[
i
].
scanlinePad
);
scrInfo
->
formats
[
i
].
scanlinePad
);
#endif
#endif
}
}
}
}
...
@@ -2950,9 +2950,9 @@ int nxagentShadowSendUpdates(int *suspended)
...
@@ -2950,9 +2950,9 @@ int nxagentShadowSendUpdates(int *suspended)
return
1
;
return
1
;
}
}
int
nxagentShadowPoll
(
PixmapPtr
nxagentShadowPixmapPtr
,
GCPtr
nxagentS
hadowGCPtr
,
int
nxagentShadowPoll
(
PixmapPtr
shadowPixmapPtr
,
GCPtr
s
hadowGCPtr
,
unsigned
char
nxagentShadowDepth
,
int
nxagentS
hadowWidth
,
unsigned
char
shadowDepth
,
int
s
hadowWidth
,
int
nxagentShadowHeight
,
char
*
nxagentS
hadowBuffer
,
int
*
changed
,
int
*
suspended
)
int
shadowHeight
,
char
*
s
hadowBuffer
,
int
*
changed
,
int
*
suspended
)
{
{
RegionRec
updateRegion
;
RegionRec
updateRegion
;
RegionRec
tempRegion
;
RegionRec
tempRegion
;
...
@@ -2977,7 +2977,7 @@ int nxagentShadowPoll(PixmapPtr nxagentShadowPixmapPtr, GCPtr nxagentShadowGCPtr
...
@@ -2977,7 +2977,7 @@ int nxagentShadowPoll(PixmapPtr nxagentShadowPixmapPtr, GCPtr nxagentShadowGCPtr
BoxRec
*
pBox
=
(
BoxRec
*
)
ptBox
;
BoxRec
*
pBox
=
(
BoxRec
*
)
ptBox
;
#ifdef TEST
#ifdef TEST
fprintf
(
stderr
,
"nxagentShadowPoll: nRects[%ld], pBox[%p] depth[%d].
\n
"
,
numRects
,
(
void
*
)
pBox
,
nxagentS
hadowDepth
);
fprintf
(
stderr
,
"nxagentShadowPoll: nRects[%ld], pBox[%p] depth[%d].
\n
"
,
numRects
,
(
void
*
)
pBox
,
s
hadowDepth
);
#endif
#endif
for
(
int
n
=
0
;
n
<
numRects
;
n
++
)
for
(
int
n
=
0
;
n
<
numRects
;
n
++
)
...
@@ -2994,7 +2994,7 @@ int nxagentShadowPoll(PixmapPtr nxagentShadowPixmapPtr, GCPtr nxagentShadowGCPtr
...
@@ -2994,7 +2994,7 @@ int nxagentShadowPoll(PixmapPtr nxagentShadowPixmapPtr, GCPtr nxagentShadowGCPtr
unsigned
int
width
=
pBox
[
n
].
y1
-
pBox
[
n
].
x1
;
/* y1 = x2 */
unsigned
int
width
=
pBox
[
n
].
y1
-
pBox
[
n
].
x1
;
/* y1 = x2 */
unsigned
int
height
=
y2
-
pBox
[
n
].
x2
;
/* x2 = y1 */
unsigned
int
height
=
y2
-
pBox
[
n
].
x2
;
/* x2 = y1 */
if
((
x
+
width
)
>
nxagentShadowWidth
||
(
y
+
height
)
>
nxagentS
hadowHeight
)
if
((
x
+
width
)
>
shadowWidth
||
(
y
+
height
)
>
s
hadowHeight
)
{
{
/*
/*
* Out of bounds. Maybe a resize of the master session is going on.
* Out of bounds. Maybe a resize of the master session is going on.
...
@@ -3028,8 +3028,8 @@ int nxagentShadowPoll(PixmapPtr nxagentShadowPixmapPtr, GCPtr nxagentShadowGCPtr
...
@@ -3028,8 +3028,8 @@ int nxagentShadowPoll(PixmapPtr nxagentShadowPixmapPtr, GCPtr nxagentShadowGCPtr
for
(
int
c
=
0
;
c
+
y
<
y2
;
c
++
)
for
(
int
c
=
0
;
c
+
y
<
y2
;
c
++
)
{
{
memcpy
(
tBuffer
,
nxagentShadowBuffer
+
x
*
nxagentBppMaster
+
memcpy
(
tBuffer
,
shadowBuffer
+
x
*
nxagentBppMaster
+
(
y
+
c
)
*
nxagentS
hadowWidth
*
nxagentBppMaster
,
line
);
(
y
+
c
)
*
s
hadowWidth
*
nxagentBppMaster
,
line
);
tBuffer
+=
line
;
tBuffer
+=
line
;
...
@@ -3042,8 +3042,8 @@ int nxagentShadowPoll(PixmapPtr nxagentShadowPixmapPtr, GCPtr nxagentShadowGCPtr
...
@@ -3042,8 +3042,8 @@ int nxagentShadowPoll(PixmapPtr nxagentShadowPixmapPtr, GCPtr nxagentShadowGCPtr
nxagentShadowAdaptDepth
(
width
,
height
,
line
,
&
tBuffer
);
nxagentShadowAdaptDepth
(
width
,
height
,
line
,
&
tBuffer
);
}
}
fbPutImage
(
nxagentVirtualDrawable
((
DrawablePtr
)
nxagentShadowPixmapPtr
),
nxagentS
hadowGCPtr
,
fbPutImage
(
nxagentVirtualDrawable
((
DrawablePtr
)
shadowPixmapPtr
),
s
hadowGCPtr
,
nxagentS
hadowDepth
,
x
,
y
,
width
,
height
,
0
,
ZPixmap
,
tBuffer
);
s
hadowDepth
,
x
,
y
,
width
,
height
,
0
,
ZPixmap
,
tBuffer
);
BoxRec
box
=
{.
x1
=
x
,
.
x2
=
x
+
width
,
.
y1
=
y
,
.
y2
=
y
+
height
};
BoxRec
box
=
{.
x1
=
x
,
.
x2
=
x
+
width
,
.
y1
=
y
,
.
y2
=
y
+
height
};
...
...
nx-X11/programs/Xserver/hw/nxagent/Split.c
View file @
c8d69eba
...
@@ -780,7 +780,7 @@ void nxagentWaitDrawable(DrawablePtr pDrawable)
...
@@ -780,7 +780,7 @@ void nxagentWaitDrawable(DrawablePtr pDrawable)
}
}
}
}
static
Bool
nxagentCommitSplitPredicate
(
Display
*
disp
lay
,
XEvent
*
event
,
XPointer
ptr
)
static
Bool
nxagentCommitSplitPredicate
(
Display
*
disp
,
XEvent
*
event
,
XPointer
ptr
)
{
{
return
(
event
->
type
==
ClientMessage
&&
return
(
event
->
type
==
ClientMessage
&&
event
->
xclient
.
data
.
l
[
0
]
==
NXCommitSplitNotify
&&
event
->
xclient
.
data
.
l
[
0
]
==
NXCommitSplitNotify
&&
...
@@ -820,7 +820,7 @@ void nxagentWaitCommitEvent(int resource)
...
@@ -820,7 +820,7 @@ void nxagentWaitCommitEvent(int resource)
}
}
}
}
static
Bool
nxagentWaitSplitPredicate
(
Display
*
disp
lay
,
XEvent
*
event
,
XPointer
ptr
)
static
Bool
nxagentWaitSplitPredicate
(
Display
*
disp
,
XEvent
*
event
,
XPointer
ptr
)
{
{
return
(
event
->
type
==
ClientMessage
&&
return
(
event
->
type
==
ClientMessage
&&
(
event
->
xclient
.
data
.
l
[
0
]
==
NXNoSplitNotify
||
(
event
->
xclient
.
data
.
l
[
0
]
==
NXNoSplitNotify
||
...
...
nx-X11/programs/Xserver/hw/nxagent/compext/Clean.c
View file @
c8d69eba
...
@@ -85,7 +85,6 @@ int CleanXYImage(XImage *image)
...
@@ -85,7 +85,6 @@ int CleanXYImage(XImage *image)
int
CleanZImage
(
XImage
*
image
)
int
CleanZImage
(
XImage
*
image
)
{
{
unsigned
int
bytesToClean
;
unsigned
int
bytesToClean
;
unsigned
int
j
;
unsigned
int
imageLength
;
unsigned
int
imageLength
;
#ifdef TEST
#ifdef TEST
...
@@ -105,8 +104,6 @@ int CleanZImage(XImage *image)
...
@@ -105,8 +104,6 @@ int CleanZImage(XImage *image)
* as fully transparent.
* as fully transparent.
*/
*/
register
int
i
;
bytesToClean
=
image
->
bytes_per_line
*
image
->
height
;
bytesToClean
=
image
->
bytes_per_line
*
image
->
height
;
#ifdef DEBUG
#ifdef DEBUG
...
@@ -118,14 +115,14 @@ int CleanZImage(XImage *image)
...
@@ -118,14 +115,14 @@ int CleanZImage(XImage *image)
if
(
image
->
byte_order
==
LSBFirst
)
if
(
image
->
byte_order
==
LSBFirst
)
{
{
for
(
i
=
3
;
i
<
bytesToClean
;
i
+=
4
)
for
(
i
nt
i
=
3
;
i
<
bytesToClean
;
i
+=
4
)
{
{
((
unsigned
char
*
)
image
->
data
)[
i
]
=
0x00
;
((
unsigned
char
*
)
image
->
data
)[
i
]
=
0x00
;
}
}
}
}
else
else
{
{
for
(
i
=
0
;
i
<
bytesToClean
;
i
+=
4
)
for
(
i
nt
i
=
0
;
i
<
bytesToClean
;
i
+=
4
)
{
{
((
unsigned
char
*
)
image
->
data
)[
i
]
=
0x00
;
((
unsigned
char
*
)
image
->
data
)[
i
]
=
0x00
;
}
}
...
@@ -138,14 +135,12 @@ int CleanZImage(XImage *image)
...
@@ -138,14 +135,12 @@ int CleanZImage(XImage *image)
case
16
:
case
16
:
case
8
:
case
8
:
{
{
register
int
i
,
j
;
bytesToClean
=
image
->
bytes_per_line
-
bytesToClean
=
image
->
bytes_per_line
-
((
image
->
width
*
image
->
bits_per_pixel
)
>>
3
);
((
image
->
width
*
image
->
bits_per_pixel
)
>>
3
);
for
(
i
=
1
;
i
<=
image
->
height
;
i
++
)
for
(
i
nt
i
=
1
;
i
<=
image
->
height
;
i
++
)
{
{
for
(
j
=
bytesToClean
;
j
>
0
;
j
--
)
for
(
int
j
=
bytesToClean
;
j
>
0
;
j
--
)
{
{
((
unsigned
char
*
)
image
->
data
)[(
i
*
image
->
bytes_per_line
)
-
j
]
=
0x00
;
((
unsigned
char
*
)
image
->
data
)[(
i
*
image
->
bytes_per_line
)
-
j
]
=
0x00
;
}
}
...
@@ -171,7 +166,7 @@ int CleanZImage(XImage *image)
...
@@ -171,7 +166,7 @@ int CleanZImage(XImage *image)
bytesToClean
=
imageLength
%
4
;
bytesToClean
=
imageLength
%
4
;
for
(
j
=
0
;
j
<
bytesToClean
;
j
++
)
for
(
int
j
=
0
;
j
<
bytesToClean
;
j
++
)
{
{
((
unsigned
char
*
)
image
->
data
)[(
imageLength
+
j
)]
=
0x00
;
((
unsigned
char
*
)
image
->
data
)[(
imageLength
+
j
)]
=
0x00
;
}
}
...
@@ -189,7 +184,6 @@ int CleanZImage(XImage *image)
...
@@ -189,7 +184,6 @@ int CleanZImage(XImage *image)
int
CopyAndCleanImage
(
XImage
*
src_image
,
XImage
*
dst_image
)
int
CopyAndCleanImage
(
XImage
*
src_image
,
XImage
*
dst_image
)
{
{
register
long
data_size
;
register
long
data_size
;
register
int
i
;
data_size
=
(
src_image
->
bytes_per_line
*
src_image
->
height
)
>>
2
;
data_size
=
(
src_image
->
bytes_per_line
*
src_image
->
height
)
>>
2
;
...
@@ -212,7 +206,7 @@ int CopyAndCleanImage(XImage *src_image, XImage *dst_image)
...
@@ -212,7 +206,7 @@ int CopyAndCleanImage(XImage *src_image, XImage *dst_image)
{
{
mask
=
0x00ffffff
;
mask
=
0x00ffffff
;
}
}
for
(
i
=
0
;
i
<
data_size
;
i
++
)
for
(
i
nt
i
=
0
;
i
<
data_size
;
i
++
)
{
{
((
unsigned
int
*
)
dst_image
->
data
)[
i
]
=
((
unsigned
int
*
)
src_image
->
data
)[
i
]
&
mask
;
((
unsigned
int
*
)
dst_image
->
data
)[
i
]
=
((
unsigned
int
*
)
src_image
->
data
)[
i
]
&
mask
;
}
}
...
@@ -224,7 +218,7 @@ int CopyAndCleanImage(XImage *src_image, XImage *dst_image)
...
@@ -224,7 +218,7 @@ int CopyAndCleanImage(XImage *src_image, XImage *dst_image)
{
{
unsigned
int
bytes_to_clean
;
unsigned
int
bytes_to_clean
;
for
(
i
=
0
;
i
<
data_size
;
i
++
)
for
(
i
nt
i
=
0
;
i
<
data_size
;
i
++
)
{
{
((
unsigned
int
*
)
dst_image
->
data
)[
i
]
=
((
unsigned
int
*
)
src_image
->
data
)[
i
];
((
unsigned
int
*
)
dst_image
->
data
)[
i
]
=
((
unsigned
int
*
)
src_image
->
data
)[
i
];
}
}
...
@@ -236,7 +230,6 @@ int CopyAndCleanImage(XImage *src_image, XImage *dst_image)
...
@@ -236,7 +230,6 @@ int CopyAndCleanImage(XImage *src_image, XImage *dst_image)
{
{
register
unsigned
int
mask
=
0xffffffff
;
register
unsigned
int
mask
=
0xffffffff
;
register
int
line_size
;
register
int
line_size
;
register
int
i
;
line_size
=
dst_image
->
bytes_per_line
>>
2
;
line_size
=
dst_image
->
bytes_per_line
>>
2
;
...
@@ -249,7 +242,7 @@ int CopyAndCleanImage(XImage *src_image, XImage *dst_image)
...
@@ -249,7 +242,7 @@ int CopyAndCleanImage(XImage *src_image, XImage *dst_image)
mask
=
mask
>>
(
bytes_to_clean
<<
3
);
mask
=
mask
>>
(
bytes_to_clean
<<
3
);
}
}
for
(
i
=
0
;
i
<
dst_image
->
height
;)
for
(
i
nt
i
=
0
;
i
<
dst_image
->
height
;)
{
{
((
unsigned
char
*
)
dst_image
->
data
)[(
++
i
*
line_size
)
-
1
]
&=
mask
;
((
unsigned
char
*
)
dst_image
->
data
)[(
++
i
*
line_size
)
-
1
]
&=
mask
;
}
}
...
@@ -261,7 +254,7 @@ int CopyAndCleanImage(XImage *src_image, XImage *dst_image)
...
@@ -261,7 +254,7 @@ int CopyAndCleanImage(XImage *src_image, XImage *dst_image)
case
15
:
case
15
:
case
16
:
case
16
:
{
{
for
(
i
=
0
;
i
<
data_size
;
i
++
)
for
(
i
nt
i
=
0
;
i
<
data_size
;
i
++
)
{
{
((
unsigned
int
*
)
dst_image
->
data
)[
i
]
=
((
unsigned
int
*
)
src_image
->
data
)[
i
];
((
unsigned
int
*
)
dst_image
->
data
)[
i
]
=
((
unsigned
int
*
)
src_image
->
data
)[
i
];
}
}
...
@@ -270,7 +263,7 @@ int CopyAndCleanImage(XImage *src_image, XImage *dst_image)
...
@@ -270,7 +263,7 @@ int CopyAndCleanImage(XImage *src_image, XImage *dst_image)
{
{
int
card32_per_line
=
dst_image
->
bytes_per_line
>>
2
;
int
card32_per_line
=
dst_image
->
bytes_per_line
>>
2
;
for
(
i
=
0
;
i
<
dst_image
->
height
;)
for
(
i
nt
i
=
0
;
i
<
dst_image
->
height
;)
{
{
((
unsigned
int
*
)
dst_image
->
data
)[(
++
i
*
card32_per_line
)
-
1
]
&=
0x0000ffff
;
((
unsigned
int
*
)
dst_image
->
data
)[(
++
i
*
card32_per_line
)
-
1
]
&=
0x0000ffff
;
}
}
...
@@ -313,7 +306,7 @@ int CopyAndCleanImage(XImage *src_image, XImage *dst_image)
...
@@ -313,7 +306,7 @@ int CopyAndCleanImage(XImage *src_image, XImage *dst_image)
}
}
}
}
for
(
i
=
0
;
i
<
data_size
;
i
++
)
for
(
i
nt
i
=
0
;
i
<
data_size
;
i
++
)
{
{
((
unsigned
int
*
)
dst_image
->
data
)[
i
]
=
((
unsigned
int
*
)
src_image
->
data
)[
i
];
((
unsigned
int
*
)
dst_image
->
data
)[
i
]
=
((
unsigned
int
*
)
src_image
->
data
)[
i
];
}
}
...
@@ -321,11 +314,10 @@ int CopyAndCleanImage(XImage *src_image, XImage *dst_image)
...
@@ -321,11 +314,10 @@ int CopyAndCleanImage(XImage *src_image, XImage *dst_image)
if
(
mask
)
if
(
mask
)
{
{
int
card32_per_line
;
int
card32_per_line
;
int
i
;
card32_per_line
=
dst_image
->
bytes_per_line
>>
2
;
card32_per_line
=
dst_image
->
bytes_per_line
>>
2
;
for
(
i
=
0
;
i
<
dst_image
->
height
;
i
++
)
for
(
i
nt
i
=
0
;
i
<
dst_image
->
height
;
i
++
)
{
{
((
unsigned
int
*
)
dst_image
->
data
)[(
++
i
*
card32_per_line
)
-
1
]
&=
mask
;
((
unsigned
int
*
)
dst_image
->
data
)[(
++
i
*
card32_per_line
)
-
1
]
&=
mask
;
}
}
...
...
nx-X11/programs/Xserver/mi/mibitblt.c
View file @
c8d69eba
...
@@ -666,7 +666,7 @@ miGetImage(pDraw, sx, sy, w, h, format, planeMask, pDst)
...
@@ -666,7 +666,7 @@ miGetImage(pDraw, sx, sy, w, h, format, planeMask, pDst)
{
{
if
(
(((
1
<<
depth
)
-
1
)
&
planeMask
)
!=
(
1
<<
depth
)
-
1
)
if
(
(((
1
<<
depth
)
-
1
)
&
planeMask
)
!=
(
1
<<
depth
)
-
1
)
{
{
xPoint
pt
;
xPoint
x
pt
;
pGC
=
GetScratchGC
(
depth
,
pDraw
->
pScreen
);
pGC
=
GetScratchGC
(
depth
,
pDraw
->
pScreen
);
if
(
!
pGC
)
if
(
!
pGC
)
...
@@ -683,9 +683,9 @@ miGetImage(pDraw, sx, sy, w, h, format, planeMask, pDst)
...
@@ -683,9 +683,9 @@ miGetImage(pDraw, sx, sy, w, h, format, planeMask, pDst)
* Clear the pixmap before doing anything else
* Clear the pixmap before doing anything else
*/
*/
ValidateGC
((
DrawablePtr
)
pPixmap
,
pGC
);
ValidateGC
((
DrawablePtr
)
pPixmap
,
pGC
);
pt
.
x
=
pt
.
y
=
0
;
xpt
.
x
=
x
pt
.
y
=
0
;
width
=
w
;
width
=
w
;
(
*
pGC
->
ops
->
FillSpans
)((
DrawablePtr
)
pPixmap
,
pGC
,
1
,
&
pt
,
&
width
,
(
*
pGC
->
ops
->
FillSpans
)((
DrawablePtr
)
pPixmap
,
pGC
,
1
,
&
x
pt
,
&
width
,
TRUE
);
TRUE
);
/* alu is already GXCopy */
/* alu is already GXCopy */
...
...
nx-X11/programs/Xserver/mi/mispans.c
View file @
c8d69eba
...
@@ -462,12 +462,12 @@ void miFillUniqueSpanGroup(pDraw, pGC, spanGroup)
...
@@ -462,12 +462,12 @@ void miFillUniqueSpanGroup(pDraw, pGC, spanGroup)
ysizes
[
index
]
*
sizeof
(
int
));
ysizes
[
index
]
*
sizeof
(
int
));
if
(
!
newpoints
||
!
newwidths
)
if
(
!
newpoints
||
!
newwidths
)
{
{
int
i
;
int
k
;
for
(
i
=
0
;
i
<
ylength
;
i
++
)
for
(
k
=
0
;
k
<
ylength
;
k
++
)
{
{
free
(
yspans
[
i
].
points
);
free
(
yspans
[
k
].
points
);
free
(
yspans
[
i
].
widths
);
free
(
yspans
[
k
].
widths
);
}
}
free
(
yspans
);
free
(
yspans
);
free
(
ysizes
);
free
(
ysizes
);
...
@@ -494,8 +494,6 @@ void miFillUniqueSpanGroup(pDraw, pGC, spanGroup)
...
@@ -494,8 +494,6 @@ void miFillUniqueSpanGroup(pDraw, pGC, spanGroup)
widths
=
(
int
*
)
malloc
(
count
*
sizeof
(
int
));
widths
=
(
int
*
)
malloc
(
count
*
sizeof
(
int
));
if
(
!
points
||
!
widths
)
if
(
!
points
||
!
widths
)
{
{
int
i
;
for
(
i
=
0
;
i
<
ylength
;
i
++
)
for
(
i
=
0
;
i
<
ylength
;
i
++
)
{
{
free
(
yspans
[
i
].
points
);
free
(
yspans
[
i
].
points
);
...
...
nx-X11/programs/Xserver/os/xdmauth.c
View file @
c8d69eba
...
@@ -61,7 +61,7 @@ static Bool authFromXDMCP;
...
@@ -61,7 +61,7 @@ static Bool authFromXDMCP;
static
XdmAuthKeyRec
privateKey
;
static
XdmAuthKeyRec
privateKey
;
static
char
XdmAuthenticationName
[]
=
"XDM-AUTHENTICATION-1"
;
static
char
XdmAuthenticationName
[]
=
"XDM-AUTHENTICATION-1"
;
#define XdmAuthenticationNameLen (sizeof XdmAuthenticationName - 1)
#define XdmAuthenticationNameLen (sizeof XdmAuthenticationName - 1)
static
XdmAuthKeyRec
rho
;
static
XdmAuthKeyRec
global_
rho
;
static
Bool
static
Bool
XdmAuthenticationValidator
(
ARRAY8Ptr
privateData
,
ARRAY8Ptr
incomingData
,
XdmAuthenticationValidator
(
ARRAY8Ptr
privateData
,
ARRAY8Ptr
incomingData
,
...
@@ -76,7 +76,7 @@ XdmAuthenticationValidator (ARRAY8Ptr privateData, ARRAY8Ptr incomingData,
...
@@ -76,7 +76,7 @@ XdmAuthenticationValidator (ARRAY8Ptr privateData, ARRAY8Ptr incomingData,
return
FALSE
;
return
FALSE
;
incoming
=
(
XdmAuthKeyPtr
)
incomingData
->
data
;
incoming
=
(
XdmAuthKeyPtr
)
incomingData
->
data
;
XdmcpDecrementKey
(
incoming
);
XdmcpDecrementKey
(
incoming
);
return
XdmcpCompareKeys
(
incoming
,
&
rho
);
return
XdmcpCompareKeys
(
incoming
,
&
global_
rho
);
}
}
return
FALSE
;
return
FALSE
;
}
}
...
@@ -89,7 +89,7 @@ XdmAuthenticationGenerator (ARRAY8Ptr privateData, ARRAY8Ptr outgoingData,
...
@@ -89,7 +89,7 @@ XdmAuthenticationGenerator (ARRAY8Ptr privateData, ARRAY8Ptr outgoingData,
outgoingData
->
data
=
0
;
outgoingData
->
data
=
0
;
if
(
packet_type
==
REQUEST
)
{
if
(
packet_type
==
REQUEST
)
{
if
(
XdmcpAllocARRAY8
(
outgoingData
,
8
))
if
(
XdmcpAllocARRAY8
(
outgoingData
,
8
))
XdmcpWrap
((
unsigned
char
*
)
&
rho
,
(
unsigned
char
*
)
&
privateKey
,
XdmcpWrap
((
unsigned
char
*
)
&
global_
rho
,
(
unsigned
char
*
)
&
privateKey
,
outgoingData
->
data
,
8
);
outgoingData
->
data
,
8
);
}
}
return
TRUE
;
return
TRUE
;
...
@@ -152,10 +152,10 @@ XdmAuthenticationInit (char *cookie, int cookie_len)
...
@@ -152,10 +152,10 @@ XdmAuthenticationInit (char *cookie, int cookie_len)
cookie_len
=
7
;
cookie_len
=
7
;
memmove
(
privateKey
.
data
+
1
,
cookie
,
cookie_len
);
memmove
(
privateKey
.
data
+
1
,
cookie
,
cookie_len
);
}
}
XdmcpGenerateKey
(
&
rho
);
XdmcpGenerateKey
(
&
global_
rho
);
XdmcpRegisterAuthentication
(
XdmAuthenticationName
,
XdmAuthenticationNameLen
,
XdmcpRegisterAuthentication
(
XdmAuthenticationName
,
XdmAuthenticationNameLen
,
(
char
*
)
&
rho
,
(
char
*
)
&
global_
rho
,
sizeof
(
rho
),
sizeof
(
global_
rho
),
(
ValidatorFunc
)
XdmAuthenticationValidator
,
(
ValidatorFunc
)
XdmAuthenticationValidator
,
(
GeneratorFunc
)
XdmAuthenticationGenerator
,
(
GeneratorFunc
)
XdmAuthenticationGenerator
,
(
AddAuthorFunc
)
XdmAuthenticationAddAuth
);
(
AddAuthorFunc
)
XdmAuthenticationAddAuth
);
...
@@ -340,7 +340,7 @@ XdmAddCookie (unsigned short data_length, char *data, XID id)
...
@@ -340,7 +340,7 @@ XdmAddCookie (unsigned short data_length, char *data, XID id)
{
{
/* R5 xdm sent bogus authorization data in the accept packet,
/* R5 xdm sent bogus authorization data in the accept packet,
* but we can recover */
* but we can recover */
rho_bits
=
rho
.
data
;
rho_bits
=
global_
rho
.
data
;
key_bits
=
(
unsigned
char
*
)
data
;
key_bits
=
(
unsigned
char
*
)
data
;
key_bits
[
0
]
=
'\0'
;
key_bits
[
0
]
=
'\0'
;
}
}
...
@@ -353,7 +353,7 @@ XdmAddCookie (unsigned short data_length, char *data, XID id)
...
@@ -353,7 +353,7 @@ XdmAddCookie (unsigned short data_length, char *data, XID id)
break
;
break
;
#ifdef XDMCP
#ifdef XDMCP
case
8
:
/* auth from XDMCP is 8 bytes long */
case
8
:
/* auth from XDMCP is 8 bytes long */
rho_bits
=
rho
.
data
;
rho_bits
=
global_
rho
.
data
;
key_bits
=
(
unsigned
char
*
)
data
;
key_bits
=
(
unsigned
char
*
)
data
;
break
;
break
;
#endif
#endif
...
@@ -477,7 +477,7 @@ XdmRemoveCookie (unsigned short data_length, char *data)
...
@@ -477,7 +477,7 @@ XdmRemoveCookie (unsigned short data_length, char *data)
break
;
break
;
#ifdef XDMCP
#ifdef XDMCP
case
8
:
case
8
:
rho_bits
=
&
rho
;
rho_bits
=
&
global_
rho
;
key_bits
=
(
XdmAuthKeyPtr
)
data
;
key_bits
=
(
XdmAuthKeyPtr
)
data
;
break
;
break
;
#endif
#endif
...
...
nx-X11/programs/Xserver/os/xdmcp.c
View file @
c8d69eba
...
@@ -679,15 +679,15 @@ XdmcpBlockHandler(
...
@@ -679,15 +679,15 @@ XdmcpBlockHandler(
struct
timeval
**
wt
,
struct
timeval
**
wt
,
void
*
pReadmask
)
void
*
pReadmask
)
{
{
fd_set
*
LastSelectM
ask
=
(
fd_set
*
)
pReadmask
;
fd_set
*
last_select_m
ask
=
(
fd_set
*
)
pReadmask
;
CARD32
millisToGo
;
CARD32
millisToGo
;
if
(
state
==
XDM_OFF
)
if
(
state
==
XDM_OFF
)
return
;
return
;
FD_SET
(
xdmcpSocket
,
LastSelectM
ask
);
FD_SET
(
xdmcpSocket
,
last_select_m
ask
);
#if defined(IPv6) && defined(AF_INET6)
#if defined(IPv6) && defined(AF_INET6)
if
(
xdmcpSocket6
>=
0
)
if
(
xdmcpSocket6
>=
0
)
FD_SET
(
xdmcpSocket6
,
LastSelectM
ask
);
FD_SET
(
xdmcpSocket6
,
last_select_m
ask
);
#endif
#endif
if
(
timeOutTime
==
0
)
if
(
timeOutTime
==
0
)
return
;
return
;
...
@@ -710,7 +710,7 @@ XdmcpWakeupHandler(
...
@@ -710,7 +710,7 @@ XdmcpWakeupHandler(
int
i
,
int
i
,
void
*
pReadmask
)
void
*
pReadmask
)
{
{
fd_set
*
LastSelectM
ask
=
(
fd_set
*
)
pReadmask
;
fd_set
*
last_select_m
ask
=
(
fd_set
*
)
pReadmask
;
#ifdef NX_TRANS_SOCKET
#ifdef NX_TRANS_SOCKET
...
@@ -723,16 +723,16 @@ XdmcpWakeupHandler(
...
@@ -723,16 +723,16 @@ XdmcpWakeupHandler(
return
;
return
;
if
(
i
>
0
)
if
(
i
>
0
)
{
{
if
(
FD_ISSET
(
xdmcpSocket
,
LastSelectM
ask
))
if
(
FD_ISSET
(
xdmcpSocket
,
last_select_m
ask
))
{
{
receive_packet
(
xdmcpSocket
);
receive_packet
(
xdmcpSocket
);
FD_CLR
(
xdmcpSocket
,
LastSelectM
ask
);
FD_CLR
(
xdmcpSocket
,
last_select_m
ask
);
}
}
#if defined(IPv6) && defined(AF_INET6)
#if defined(IPv6) && defined(AF_INET6)
if
(
xdmcpSocket6
>=
0
&&
FD_ISSET
(
xdmcpSocket6
,
LastSelectM
ask
))
if
(
xdmcpSocket6
>=
0
&&
FD_ISSET
(
xdmcpSocket6
,
last_select_m
ask
))
{
{
receive_packet
(
xdmcpSocket6
);
receive_packet
(
xdmcpSocket6
);
FD_CLR
(
xdmcpSocket6
,
LastSelectM
ask
);
FD_CLR
(
xdmcpSocket6
,
last_select_m
ask
);
}
}
#endif
#endif
}
}
...
@@ -757,12 +757,12 @@ static void
...
@@ -757,12 +757,12 @@ static void
XdmcpSelectHost
(
XdmcpSelectHost
(
struct
sockaddr
*
host_sockaddr
,
struct
sockaddr
*
host_sockaddr
,
int
host_len
,
int
host_len
,
ARRAY8Ptr
AuthenticationN
ame
)
ARRAY8Ptr
auth_n
ame
)
{
{
state
=
XDM_START_CONNECTION
;
state
=
XDM_START_CONNECTION
;
memmove
(
&
req_sockaddr
,
host_sockaddr
,
host_len
);
memmove
(
&
req_sockaddr
,
host_sockaddr
,
host_len
);
req_socklen
=
host_len
;
req_socklen
=
host_len
;
XdmcpSetAuthentication
(
AuthenticationN
ame
);
XdmcpSetAuthentication
(
auth_n
ame
);
send_packet
();
send_packet
();
}
}
...
@@ -777,11 +777,11 @@ static void
...
@@ -777,11 +777,11 @@ static void
XdmcpAddHost
(
XdmcpAddHost
(
struct
sockaddr
*
from
,
struct
sockaddr
*
from
,
int
fromlen
,
int
fromlen
,
ARRAY8Ptr
AuthenticationN
ame
,
ARRAY8Ptr
auth_n
ame
,
ARRAY8Ptr
hostname
,
ARRAY8Ptr
hostname
,
ARRAY8Ptr
status
)
ARRAY8Ptr
status
)
{
{
XdmcpSelectHost
(
from
,
fromlen
,
AuthenticationN
ame
);
XdmcpSelectHost
(
from
,
fromlen
,
auth_n
ame
);
}
}
/*
/*
...
@@ -1066,8 +1066,6 @@ send_query_msg(void)
...
@@ -1066,8 +1066,6 @@ send_query_msg(void)
XdmcpWriteARRAYofARRAY8
(
&
buffer
,
&
AuthenticationNames
);
XdmcpWriteARRAYofARRAY8
(
&
buffer
,
&
AuthenticationNames
);
if
(
broadcast
)
if
(
broadcast
)
{
{
int
i
;
for
(
i
=
0
;
i
<
NumBroadcastAddresses
;
i
++
)
for
(
i
=
0
;
i
<
NumBroadcastAddresses
;
i
++
)
XdmcpFlush
(
xdmcpSocket
,
&
buffer
,
(
XdmcpNetaddr
)
&
BroadcastAddresses
[
i
],
XdmcpFlush
(
xdmcpSocket
,
&
buffer
,
(
XdmcpNetaddr
)
&
BroadcastAddresses
[
i
],
sizeof
(
struct
sockaddr_in
));
sizeof
(
struct
sockaddr_in
));
...
...
nx-X11/programs/Xserver/xkb/ddxList.c
View file @
c8d69eba
...
@@ -136,7 +136,6 @@ char tmpname[PATH_MAX];
...
@@ -136,7 +136,6 @@ char tmpname[PATH_MAX];
file
=
list
->
pattern
[
what
];
file
=
list
->
pattern
[
what
];
map
=
strrchr
(
file
,
'('
);
map
=
strrchr
(
file
,
'('
);
if
(
map
!=
NULL
)
{
if
(
map
!=
NULL
)
{
char
*
tmp
;
map
++
;
map
++
;
tmp
=
strrchr
(
map
,
')'
);
tmp
=
strrchr
(
map
,
')'
);
if
((
tmp
==
NULL
)
||
(
tmp
[
1
]
!=
'\0'
))
{
if
((
tmp
==
NULL
)
||
(
tmp
[
1
]
!=
'\0'
))
{
...
...
nx-X11/programs/Xserver/xkb/xkb.c
View file @
c8d69eba
...
@@ -876,21 +876,21 @@ XkbWriteKeyTypes( XkbDescPtr xkb,
...
@@ -876,21 +876,21 @@ XkbWriteKeyTypes( XkbDescPtr xkb,
buf
=
(
char
*
)
&
wire
[
1
];
buf
=
(
char
*
)
&
wire
[
1
];
if
(
wire
->
nMapEntries
>
0
)
{
if
(
wire
->
nMapEntries
>
0
)
{
xkbKTMapEntryWireDesc
*
wire
;
xkbKTMapEntryWireDesc
*
e
wire
;
XkbKTMapEntryPtr
entry
;
XkbKTMapEntryPtr
entry
;
wire
=
(
xkbKTMapEntryWireDesc
*
)
buf
;
e
wire
=
(
xkbKTMapEntryWireDesc
*
)
buf
;
entry
=
type
->
map
;
entry
=
type
->
map
;
for
(
n
=
0
;
n
<
type
->
map_count
;
n
++
,
wire
++
,
entry
++
)
{
for
(
n
=
0
;
n
<
type
->
map_count
;
n
++
,
e
wire
++
,
entry
++
)
{
wire
->
active
=
entry
->
active
;
e
wire
->
active
=
entry
->
active
;
wire
->
mask
=
entry
->
mods
.
mask
;
e
wire
->
mask
=
entry
->
mods
.
mask
;
wire
->
level
=
entry
->
level
;
e
wire
->
level
=
entry
->
level
;
wire
->
realMods
=
entry
->
mods
.
real_mods
;
e
wire
->
realMods
=
entry
->
mods
.
real_mods
;
wire
->
virtualMods
=
entry
->
mods
.
vmods
;
e
wire
->
virtualMods
=
entry
->
mods
.
vmods
;
if
(
client
->
swapped
)
{
if
(
client
->
swapped
)
{
swaps
(
&
wire
->
virtualMods
);
swaps
(
&
e
wire
->
virtualMods
);
}
}
}
}
buf
=
(
char
*
)
wire
;
buf
=
(
char
*
)
e
wire
;
if
(
type
->
preserve
!=
NULL
)
{
if
(
type
->
preserve
!=
NULL
)
{
xkbModsWireDesc
*
pwire
;
xkbModsWireDesc
*
pwire
;
XkbModsPtr
preserve
;
XkbModsPtr
preserve
;
...
@@ -2598,7 +2598,6 @@ ProcXkbSetCompatMap(ClientPtr client)
...
@@ -2598,7 +2598,6 @@ ProcXkbSetCompatMap(ClientPtr client)
}
}
if
(
stuff
->
groups
!=
0
)
{
if
(
stuff
->
groups
!=
0
)
{
register
unsigned
i
,
bit
;
xkbModsWireDesc
*
wire
=
(
xkbModsWireDesc
*
)
data
;
xkbModsWireDesc
*
wire
=
(
xkbModsWireDesc
*
)
data
;
for
(
i
=
0
,
bit
=
1
;
i
<
XkbNumKbdGroups
;
i
++
,
bit
<<=
1
)
{
for
(
i
=
0
,
bit
=
1
;
i
<
XkbNumKbdGroups
;
i
++
,
bit
<<=
1
)
{
if
(
stuff
->
groups
&
bit
)
{
if
(
stuff
->
groups
&
bit
)
{
...
...
nx-X11/programs/Xserver/xkb/xkbActions.c
View file @
c8d69eba
...
@@ -1040,10 +1040,10 @@ _XkbFilterDeviceBtn( XkbSrvInfoPtr xkbi,
...
@@ -1040,10 +1040,10 @@ _XkbFilterDeviceBtn( XkbSrvInfoPtr xkbi,
unsigned
keycode
,
unsigned
keycode
,
XkbAction
*
pAction
)
XkbAction
*
pAction
)
{
{
DeviceIntPtr
dev
;
int
button
;
if
(
filter
->
keycode
==
0
)
{
/* initial press */
if
(
filter
->
keycode
==
0
)
{
/* initial press */
DeviceIntPtr
dev
;
int
button
;
dev
=
_XkbLookupButtonDevice
(
pAction
->
devbtn
.
device
,
NULL
);
dev
=
_XkbLookupButtonDevice
(
pAction
->
devbtn
.
device
,
NULL
);
if
((
!
dev
)
||
(
!
dev
->
public
.
on
)
||
(
&
dev
->
public
==
LookupPointerDevice
()))
if
((
!
dev
)
||
(
!
dev
->
public
.
on
)
||
(
&
dev
->
public
==
LookupPointerDevice
()))
return
1
;
return
1
;
...
@@ -1081,7 +1081,8 @@ int button;
...
@@ -1081,7 +1081,8 @@ int button;
}
}
}
}
else
if
(
filter
->
keycode
==
keycode
)
{
else
if
(
filter
->
keycode
==
keycode
)
{
int
button
;
DeviceIntPtr
dev
;
int
button
;
filter
->
active
=
0
;
filter
->
active
=
0
;
dev
=
_XkbLookupButtonDevice
(
filter
->
upAction
.
devbtn
.
device
,
NULL
);
dev
=
_XkbLookupButtonDevice
(
filter
->
upAction
.
devbtn
.
device
,
NULL
);
...
...
nx-X11/programs/Xserver/xkb/xkbLEDs.c
View file @
c8d69eba
...
@@ -630,11 +630,9 @@ XkbSrvLedInfoPtr sli;
...
@@ -630,11 +630,9 @@ XkbSrvLedInfoPtr sli;
/* optimization to check for most common case */
/* optimization to check for most common case */
if
(((
class
==
XkbDfltXIClass
)
&&
(
id
==
XkbDfltXIId
))
&&
(
dev
->
kbdfeed
))
{
if
(((
class
==
XkbDfltXIClass
)
&&
(
id
==
XkbDfltXIId
))
&&
(
dev
->
kbdfeed
))
{
XkbSrvLedInfoPtr
sli
;
sli
=
dev
->
kbdfeed
->
xkb_sli
;
if
(
dev
->
kbdfeed
->
xkb_sli
==
NULL
)
{
if
(
dev
->
kbdfeed
->
xkb_sli
==
NULL
)
{
sli
=
XkbAllocSrvLedInfo
(
dev
,
dev
->
kbdfeed
,
NULL
,
needed_parts
);
dev
->
kbdfeed
->
xkb_sli
=
dev
->
kbdfeed
->
xkb_sli
=
sli
;
XkbAllocSrvLedInfo
(
dev
,
dev
->
kbdfeed
,
NULL
,
needed_parts
)
;
}
}
return
dev
->
kbdfeed
->
xkb_sli
;
return
dev
->
kbdfeed
->
xkb_sli
;
}
}
...
...
nx-X11/programs/Xserver/xkb/xkbPrKeyEv.c
View file @
c8d69eba
...
@@ -117,12 +117,12 @@ unsigned ndx;
...
@@ -117,12 +117,12 @@ unsigned ndx;
return
;
return
;
}
}
if
(
rg
->
currentDown
!=
0
)
{
if
(
rg
->
currentDown
!=
0
)
{
int
key
=
xE
->
u
.
u
.
detail
;
int
tmp
key
=
xE
->
u
.
u
.
detail
;
xE
->
u
.
u
.
type
=
KeyRelease
;
xE
->
u
.
u
.
type
=
KeyRelease
;
xE
->
u
.
u
.
detail
=
rg
->
currentDown
;
xE
->
u
.
u
.
detail
=
rg
->
currentDown
;
XkbHandleActions
(
keybd
,
keybd
,
xE
,
count
);
XkbHandleActions
(
keybd
,
keybd
,
xE
,
count
);
xE
->
u
.
u
.
type
=
KeyPress
;
xE
->
u
.
u
.
type
=
KeyPress
;
xE
->
u
.
u
.
detail
=
key
;
xE
->
u
.
u
.
detail
=
tmp
key
;
}
}
rg
->
currentDown
=
key
;
rg
->
currentDown
=
key
;
}
}
...
...
nx-X11/programs/Xserver/xkb/xkbtext.c
View file @
c8d69eba
...
@@ -1271,7 +1271,6 @@ char buf[256],*tmp;
...
@@ -1271,7 +1271,6 @@ char buf[256],*tmp;
}
}
else
if
(
type
==
XkbKB_RadioGroup
)
{
else
if
(
type
==
XkbKB_RadioGroup
)
{
int
g
;
int
g
;
char
*
tmp
;
g
=
((
behavior
->
data
)
&
(
~
XkbKB_RGAllowNone
))
+
1
;
g
=
((
behavior
->
data
)
&
(
~
XkbKB_RGAllowNone
))
+
1
;
if
(
XkbKB_RGAllowNone
&
behavior
->
data
)
{
if
(
XkbKB_RGAllowNone
&
behavior
->
data
)
{
sprintf
(
buf
,
"allowNone,"
);
sprintf
(
buf
,
"allowNone,"
);
...
...
nx-X11/programs/Xserver/xkb/xkmread.c
View file @
c8d69eba
...
@@ -636,7 +636,6 @@ XkbDescPtr xkb;
...
@@ -636,7 +636,6 @@ XkbDescPtr xkb;
bzero
((
char
*
)
typeName
,
XkbNumKbdGroups
*
sizeof
(
Atom
));
bzero
((
char
*
)
typeName
,
XkbNumKbdGroups
*
sizeof
(
Atom
));
bzero
((
char
*
)
type
,
XkbNumKbdGroups
*
sizeof
(
XkbKeyTypePtr
));
bzero
((
char
*
)
type
,
XkbNumKbdGroups
*
sizeof
(
XkbKeyTypePtr
));
if
(
wireMap
.
flags
&
XkmKeyHasTypes
)
{
if
(
wireMap
.
flags
&
XkmKeyHasTypes
)
{
register
int
g
;
for
(
g
=
0
;
g
<
XkbNumKbdGroups
;
g
++
)
{
for
(
g
=
0
;
g
<
XkbNumKbdGroups
;
g
++
)
{
if
((
wireMap
.
flags
&
(
1
<<
g
))
&&
if
((
wireMap
.
flags
&
(
1
<<
g
))
&&
((
tmp
=
XkmGetCountedString
(
file
,
buf
,
100
))
>
0
))
{
((
tmp
=
XkmGetCountedString
(
file
,
buf
,
100
))
>
0
))
{
...
...
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