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
4821edfe
Commit
4821edfe
authored
Jan 25, 2020
by
Ulrich Sibiller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nxagent: rename variables that shadow globals
parent
2adab297
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
61 additions
and
61 deletions
+61
-61
Client.c
nx-X11/programs/Xserver/hw/nxagent/Client.c
+1
-1
Display.c
nx-X11/programs/Xserver/hw/nxagent/Display.c
+15
-15
Events.c
nx-X11/programs/Xserver/hw/nxagent/Events.c
+5
-5
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
Screen.c
nx-X11/programs/Xserver/hw/nxagent/Screen.c
+31
-31
Split.c
nx-X11/programs/Xserver/hw/nxagent/Split.c
+2
-2
No files found.
nx-X11/programs/Xserver/hw/nxagent/Client.c
View file @
4821edfe
...
...
@@ -303,7 +303,7 @@ void nxagentWakeupByReset(ClientPtr client)
#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
&&
(
event
->
xclient
.
data
.
l
[
0
]
==
NXNoSplitNotify
||
...
...
nx-X11/programs/Xserver/hw/nxagent/Display.c
View file @
4821edfe
...
...
@@ -110,7 +110,7 @@ Bool nxagentTrue24 = False;
int
nxagentNumVisuals
;
int
nxagentXConnectionNumber
;
int
nxagentIOErrorHandler
(
Display
*
disp
lay
);
int
nxagentIOErrorHandler
(
Display
*
disp
);
static
Bool
nxagentDisplayInfoSaved
=
False
;
static
Display
*
nxagentDisplayBackup
=
NULL
;
...
...
@@ -170,7 +170,7 @@ Pixmap nxagentIconPixmap;
Pixmap
nxagentIconShape
;
Bool
useXpmIcon
=
False
;
Bool
nxagentMakeIcon
(
Display
*
disp
lay
,
Pixmap
*
nxIcon
,
Pixmap
*
nxMask
);
Bool
nxagentMakeIcon
(
Display
*
disp
,
Pixmap
*
nxIcon
,
Pixmap
*
nxMask
);
static
void
nxagentInitVisuals
(
void
);
...
...
@@ -188,7 +188,7 @@ static int nxagentCheckForColormapsCompatibility(int flexibility);
* Save Internal implementation Also called in Reconnect.c.
*/
Display
*
nxagentInternalOpenDisplay
(
char
*
disp
lay
);
Display
*
nxagentInternalOpenDisplay
(
char
*
disp
);
#ifdef NXAGENT_TIMESTAMP
unsigned
long
startTime
;
...
...
@@ -226,7 +226,7 @@ int nxagentServerOrder(void)
* be probably moved to Handlers.c.
*/
int
nxagentIOErrorHandler
(
Display
*
disp
lay
)
int
nxagentIOErrorHandler
(
Display
*
disp
)
{
#ifdef TEST
fprintf
(
stderr
,
"nxagentIOErrorHandler: Got I/O error with nxagentException.ioError [%d].
\n
"
,
...
...
@@ -559,7 +559,7 @@ static void nxagentSigchldHandler(int signal)
return
;
}
Display
*
nxagentInternalOpenDisplay
(
char
*
disp
lay
)
Display
*
nxagentInternalOpenDisplay
(
char
*
disp
)
{
/*
* 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
#ifdef TEST
fprintf
(
stderr
,
"nxagentInternalOpenDisplay: Going to open the display [%s].
\n
"
,
disp
lay
);
disp
);
#endif
Display
*
newDisplay
=
XOpenDisplay
(
disp
lay
);
Display
*
newDisplay
=
XOpenDisplay
(
disp
);
alarm
(
0
);
...
...
@@ -630,7 +630,7 @@ FIXME: Should print a warning if the user tries to let the agent
return
newDisplay
;
}
static
void
nxagentDisplayBlockHandler
(
Display
*
disp
lay
,
int
reason
)
static
void
nxagentDisplayBlockHandler
(
Display
*
disp
,
int
reason
)
{
if
(
nxagentDisplay
!=
NULL
)
{
...
...
@@ -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
)
{
...
...
@@ -717,7 +717,7 @@ int nxagentGetDataRate(void)
return
nxagentRate
;
}
static
void
nxagentDisplayFlushHandler
(
Display
*
disp
lay
,
int
length
)
static
void
nxagentDisplayFlushHandler
(
Display
*
disp
,
int
length
)
{
if
(
nxagentDisplay
!=
NULL
)
{
...
...
@@ -768,7 +768,7 @@ static void nxagentDisplayFlushHandler(Display *display, int length)
* rupt was received or if any other event occurred mandating the
+ end of the session."
*/
static
int
nxagentDisplayErrorPredicate
(
Display
*
disp
lay
,
int
error
)
static
int
nxagentDisplayErrorPredicate
(
Display
*
disp
,
int
error
)
{
#ifdef TEST
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)
else
if
(
nxagentException
.
sigHup
>
0
||
nxagentException
.
ioError
>
0
)
{
NXForceDisplayError
(
disp
lay
);
NXForceDisplayError
(
disp
);
return
1
;
}
...
...
@@ -1746,7 +1746,7 @@ FIXME: Is this needed?
nxagentDisplay
=
NULL
;
}
Bool
nxagentMakeIcon
(
Display
*
disp
lay
,
Pixmap
*
nxIcon
,
Pixmap
*
nxMask
)
Bool
nxagentMakeIcon
(
Display
*
disp
,
Pixmap
*
nxIcon
,
Pixmap
*
nxMask
)
{
char
**
agentIconData
;
...
...
@@ -1764,8 +1764,8 @@ Bool nxagentMakeIcon(Display *display, Pixmap *nxIcon, Pixmap *nxMask)
XlibPixmap
IconPixmap
;
XlibPixmap
IconShape
;
if
(
XpmSuccess
==
XpmCreatePixmapFromData
(
disp
lay
,
DefaultRootWindow
(
disp
lay
),
if
(
XpmSuccess
==
XpmCreatePixmapFromData
(
disp
,
DefaultRootWindow
(
disp
),
agentIconData
,
&
IconPixmap
,
&
IconShape
,
...
...
nx-X11/programs/Xserver/hw/nxagent/Events.c
View file @
4821edfe
...
...
@@ -167,7 +167,7 @@ void nxagentHandleCollectPropertyEvent(XEvent*);
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
...
...
@@ -702,7 +702,7 @@ static void nxagentToggleAutoGrab(void)
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
...
...
@@ -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
;
}
int
nxagentInputEventPredicate
(
Display
*
disp
lay
,
XEvent
*
event
,
XPointer
parameter
)
int
nxagentInputEventPredicate
(
Display
*
disp
,
XEvent
*
event
,
XPointer
parameter
)
{
switch
(
event
->
type
)
{
...
...
@@ -3883,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
&&
X
->
xclient
.
message_type
==
0
&&
...
...
nx-X11/programs/Xserver/hw/nxagent/Events.h
View file @
4821edfe
...
...
@@ -68,9 +68,9 @@ typedef int (*GetResourceFuncPtr)(Display*);
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
...
...
nx-X11/programs/Xserver/hw/nxagent/Handlers.c
View file @
4821edfe
...
...
@@ -941,7 +941,7 @@ void nxagentHandleCollectInputFocusEvent(int resource)
#endif
}
Bool
nxagentCollectInputFocusPredicate
(
Display
*
disp
lay
,
XEvent
*
X
,
XPointer
ptr
)
Bool
nxagentCollectInputFocusPredicate
(
Display
*
disp
,
XEvent
*
X
,
XPointer
ptr
)
{
return
(
X
->
xclient
.
window
==
0
&&
X
->
xclient
.
message_type
==
0
&&
...
...
nx-X11/programs/Xserver/hw/nxagent/Init.c
View file @
4821edfe
...
...
@@ -203,7 +203,7 @@ void checkX2goAgent(void)
/*
* 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.
...
...
@@ -329,13 +329,13 @@ FIXME: These variables, if not removed at all because have probably
* Initialize the basic screen info.
*/
nxagentSetScreenInfo
(
scr
een
Info
);
nxagentSetScreenInfo
(
scrInfo
);
/*
* Initialize pixmap formats for this screen.
*/
nxagentSetPixmapFormats
(
scr
een
Info
);
nxagentSetPixmapFormats
(
scrInfo
);
/*
* Get our own privates' index.
...
...
@@ -370,7 +370,7 @@ FIXME: These variables, if not removed at all because have probably
AddScreen
(
nxagentOpenScreen
,
argc
,
argv
);
}
nxagentNumScreens
=
scr
een
Info
->
numScreens
;
nxagentNumScreens
=
scrInfo
->
numScreens
;
/*
* Initialize the GCs used by the synchronization put images. We do
...
...
nx-X11/programs/Xserver/hw/nxagent/Screen.c
View file @
4821edfe
...
...
@@ -236,7 +236,7 @@ int nxagentBitsPerPixel(int depth)
else
return
32
;
}
void
nxagentSetScreenInfo
(
ScreenInfo
*
scr
een
Info
)
void
nxagentSetScreenInfo
(
ScreenInfo
*
scrInfo
)
{
/*
* Setup global screen info parameters. In the Xnest
...
...
@@ -248,34 +248,34 @@ void nxagentSetScreenInfo(ScreenInfo *screenInfo)
*
* From a standard implementation:
*
* scr
een
Info->imageByteOrder = IMAGE_BYTE_ORDER;
* scr
een
Info->bitmapScanlinePad = BITMAP_SCANLINE_PAD;
* scr
een
Info->bitmapScanlineUnit = BITMAP_SCANLINE_UNIT;
* scr
een
Info->bitmapBitOrder = BITMAP_BIT_ORDER;
* scrInfo->imageByteOrder = IMAGE_BYTE_ORDER;
* scrInfo->bitmapScanlinePad = BITMAP_SCANLINE_PAD;
* scrInfo->bitmapScanlineUnit = BITMAP_SCANLINE_UNIT;
* scrInfo->bitmapBitOrder = BITMAP_BIT_ORDER;
*
* From Xnest implementation:
*
* scr
een
Info -> imageByteOrder = ImageByteOrder(nxagentDisplay);
* scr
een
Info -> bitmapScanlineUnit = BitmapUnit(nxagentDisplay);
* scr
een
Info -> bitmapScanlinePad = BitmapPad(nxagentDisplay);
* scr
een
Info -> bitmapBitOrder = BitmapBitOrder(nxagentDisplay);
* scrInfo -> imageByteOrder = ImageByteOrder(nxagentDisplay);
* scrInfo -> bitmapScanlineUnit = BitmapUnit(nxagentDisplay);
* scrInfo -> bitmapScanlinePad = BitmapPad(nxagentDisplay);
* scrInfo -> bitmapBitOrder = BitmapBitOrder(nxagentDisplay);
*/
scr
een
Info
->
imageByteOrder
=
IMAGE_BYTE_ORDER
;
scr
een
Info
->
bitmapScanlinePad
=
BITMAP_SCANLINE_PAD
;
scr
een
Info
->
bitmapScanlineUnit
=
BITMAP_SCANLINE_UNIT
;
scr
een
Info
->
bitmapBitOrder
=
BITMAP_BIT_ORDER
;
scrInfo
->
imageByteOrder
=
IMAGE_BYTE_ORDER
;
scrInfo
->
bitmapScanlinePad
=
BITMAP_SCANLINE_PAD
;
scrInfo
->
bitmapScanlineUnit
=
BITMAP_SCANLINE_UNIT
;
scrInfo
->
bitmapBitOrder
=
BITMAP_BIT_ORDER
;
#ifdef TEST
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
"
,
scr
eenInfo
->
bitmapScanlineUnit
,
screen
Info
->
bitmapScanlinePad
);
scr
Info
->
bitmapScanlineUnit
,
scr
Info
->
bitmapScanlinePad
);
#endif
}
void
nxagentSetPixmapFormats
(
ScreenInfo
*
scr
een
Info
)
void
nxagentSetPixmapFormats
(
ScreenInfo
*
scrInfo
)
{
/*
* Formats are created with no care of which are supported
...
...
@@ -284,19 +284,19 @@ void nxagentSetPixmapFormats(ScreenInfo *screenInfo)
* of session from a display to another.
*/
scr
een
Info
->
numPixmapFormats
=
nxagentNumPixmapFormats
;
scrInfo
->
numPixmapFormats
=
nxagentNumPixmapFormats
;
for
(
int
i
=
0
;
i
<
nxagentNumPixmapFormats
;
i
++
)
{
scr
een
Info
->
formats
[
i
].
depth
=
nxagentPixmapFormats
[
i
].
depth
;
scr
een
Info
->
formats
[
i
].
bitsPerPixel
=
nxagentPixmapFormats
[
i
].
bits_per_pixel
;
scr
een
Info
->
formats
[
i
].
scanlinePad
=
nxagentPixmapFormats
[
i
].
scanline_pad
;
scrInfo
->
formats
[
i
].
depth
=
nxagentPixmapFormats
[
i
].
depth
;
scrInfo
->
formats
[
i
].
bitsPerPixel
=
nxagentPixmapFormats
[
i
].
bits_per_pixel
;
scrInfo
->
formats
[
i
].
scanlinePad
=
nxagentPixmapFormats
[
i
].
scanline_pad
;
#ifdef TEST
fprintf
(
stderr
,
"nxagentSetPixmapFormats: Set format at index [%d] to depth [%d] "
"bits per pixel [%d] scanline pad [%d].
\n
"
,
i
,
scr
eenInfo
->
formats
[
i
].
depth
,
screen
Info
->
formats
[
i
].
bitsPerPixel
,
scr
een
Info
->
formats
[
i
].
scanlinePad
);
scr
Info
->
formats
[
i
].
depth
,
scr
Info
->
formats
[
i
].
bitsPerPixel
,
scrInfo
->
formats
[
i
].
scanlinePad
);
#endif
}
}
...
...
@@ -2950,9 +2950,9 @@ int nxagentShadowSendUpdates(int *suspended)
return
1
;
}
int
nxagentShadowPoll
(
PixmapPtr
nxagentShadowPixmapPtr
,
GCPtr
nxagentS
hadowGCPtr
,
unsigned
char
nxagentShadowDepth
,
int
nxagentS
hadowWidth
,
int
nxagentShadowHeight
,
char
*
nxagentS
hadowBuffer
,
int
*
changed
,
int
*
suspended
)
int
nxagentShadowPoll
(
PixmapPtr
shadowPixmapPtr
,
GCPtr
s
hadowGCPtr
,
unsigned
char
shadowDepth
,
int
s
hadowWidth
,
int
shadowHeight
,
char
*
s
hadowBuffer
,
int
*
changed
,
int
*
suspended
)
{
RegionRec
updateRegion
;
RegionRec
tempRegion
;
...
...
@@ -2977,7 +2977,7 @@ int nxagentShadowPoll(PixmapPtr nxagentShadowPixmapPtr, GCPtr nxagentShadowGCPtr
BoxRec
*
pBox
=
(
BoxRec
*
)
ptBox
;
#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
for
(
int
n
=
0
;
n
<
numRects
;
n
++
)
...
...
@@ -2994,7 +2994,7 @@ int nxagentShadowPoll(PixmapPtr nxagentShadowPixmapPtr, GCPtr nxagentShadowGCPtr
unsigned
int
width
=
pBox
[
n
].
y1
-
pBox
[
n
].
x1
;
/* y1 = x2 */
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.
...
...
@@ -3028,8 +3028,8 @@ int nxagentShadowPoll(PixmapPtr nxagentShadowPixmapPtr, GCPtr nxagentShadowGCPtr
for
(
int
c
=
0
;
c
+
y
<
y2
;
c
++
)
{
memcpy
(
tBuffer
,
nxagentShadowBuffer
+
x
*
nxagentBppMaster
+
(
y
+
c
)
*
nxagentS
hadowWidth
*
nxagentBppMaster
,
line
);
memcpy
(
tBuffer
,
shadowBuffer
+
x
*
nxagentBppMaster
+
(
y
+
c
)
*
s
hadowWidth
*
nxagentBppMaster
,
line
);
tBuffer
+=
line
;
...
...
@@ -3042,8 +3042,8 @@ int nxagentShadowPoll(PixmapPtr nxagentShadowPixmapPtr, GCPtr nxagentShadowGCPtr
nxagentShadowAdaptDepth
(
width
,
height
,
line
,
&
tBuffer
);
}
fbPutImage
(
nxagentVirtualDrawable
((
DrawablePtr
)
nxagentShadowPixmapPtr
),
nxagentS
hadowGCPtr
,
nxagentS
hadowDepth
,
x
,
y
,
width
,
height
,
0
,
ZPixmap
,
tBuffer
);
fbPutImage
(
nxagentVirtualDrawable
((
DrawablePtr
)
shadowPixmapPtr
),
s
hadowGCPtr
,
s
hadowDepth
,
x
,
y
,
width
,
height
,
0
,
ZPixmap
,
tBuffer
);
BoxRec
box
=
{.
x1
=
x
,
.
x2
=
x
+
width
,
.
y1
=
y
,
.
y2
=
y
+
height
};
...
...
nx-X11/programs/Xserver/hw/nxagent/Split.c
View file @
4821edfe
...
...
@@ -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
&&
event
->
xclient
.
data
.
l
[
0
]
==
NXCommitSplitNotify
&&
...
...
@@ -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
&&
(
event
->
xclient
.
data
.
l
[
0
]
==
NXNoSplitNotify
||
...
...
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