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
22914447
Commit
22914447
authored
Oct 10, 2011
by
Reinhard Tartler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Imported nxagent-3.3.0-18.tar.gz
Summary: Imported nxagent-3.3.0-18.tar.gz Keywords: Imported nxagent-3.3.0-18.tar.gz into Git repository
parent
fc05e5e0
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
237 additions
and
23 deletions
+237
-23
CHANGELOG
nx-X11/programs/Xserver/hw/nxagent/CHANGELOG
+32
-0
Clipboard.c
nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
+24
-0
Colormap.c
nx-X11/programs/Xserver/hw/nxagent/Colormap.c
+14
-3
Dialog.h
nx-X11/programs/Xserver/hw/nxagent/Dialog.h
+1
-1
Display.c
nx-X11/programs/Xserver/hw/nxagent/Display.c
+15
-0
GCOps.c
nx-X11/programs/Xserver/hw/nxagent/GCOps.c
+87
-0
Rootless.c
nx-X11/programs/Xserver/hw/nxagent/Rootless.c
+50
-14
Screen.c
nx-X11/programs/Xserver/hw/nxagent/Screen.c
+14
-5
No files found.
nx-X11/programs/Xserver/hw/nxagent/CHANGELOG
View file @
22914447
ChangeLog:
nxagent-3.3.0-18
- The area to restore from the backing store is limited by the screen
size instead of the visible screen.
nxagent-3.3.0-17
- Fixed TR12F02150. The agent could crash when copying text from VNC
viewer. Fixed by aborting the procedure in case the retrieved pro-
perty has not a valid format.
nxagent-3.3.0-16
- Fixed TR07G02247. Don't try to call XSetWindowColormap() if the
window has no colormap, e.g. if its class is InputOnly.
nxagent-3.3.0-15
- Fixed TR04G02210. Region is cut to the visible screen before re-
storing areas from the backing store.
- Fixed TR07G02246. Box is shrinked if bounds can't stay in a short
signed integer.
nxagent-3.3.0-14
- Fixed TR03G02206. waitpid() call was missing for the "Fonts replace-
ment" dialog type.
- Fixed TR03G02195. Added a properties structure compatible with 32
and 64 bit platform types.
nxagent-3.3.0-13
- Handle the window unmap immediately. Don't add it to the configure
...
...
nx-X11/programs/Xserver/hw/nxagent/Clipboard.c
View file @
22914447
...
...
@@ -680,6 +680,30 @@ void nxagentCollectPropertyEvent(int resource)
return
;
}
if
(
resultFormat
!=
8
&&
resultFormat
!=
16
&&
resultFormat
!=
32
)
{
#ifdef DEBUG
fprintf
(
stderr
,
"nxagentCollectPropertyEvent: WARNING! Invalid property "
"value.
\n
"
);
#endif
if
(
lastClientClientPtr
!=
NULL
)
{
nxagentSendSelectionNotify
(
None
);
}
lastClientWindowPtr
=
NULL
;
lastClientStage
=
SelectionStageNone
;
if
(
pszReturnData
!=
NULL
)
{
XFree
(
pszReturnData
);
}
return
;
}
switch
(
lastClientStage
)
{
...
...
nx-X11/programs/Xserver/hw/nxagent/Colormap.c
View file @
22914447
...
...
@@ -291,9 +291,20 @@ void nxagentSetInstalledColormapWindows(ScreenPtr pScreen)
pCmap
=
(
ColormapPtr
)
LookupIDByType
(
pScreen
->
defColormap
,
RT_COLORMAP
);
XSetWindowColormap
(
nxagentDisplay
,
nxagentDefaultWindows
[
pScreen
->
myNum
],
nxagentColormap
(
pCmap
));
if
(
pCmap
!=
NULL
)
{
XSetWindowColormap
(
nxagentDisplay
,
nxagentDefaultWindows
[
pScreen
->
myNum
],
nxagentColormap
(
pCmap
));
}
#ifdef WARNING
else
{
fprintf
(
stderr
,
"nxagentSetInstalledColormapWindows: WARNING! "
"Window at [%p] has no colormap with class [%d].
\n
"
,
pWin
,
pWin
->
drawable
.
class
);
}
#endif
}
#endif
/* DUMB_WINDOW_MANAGERS */
}
...
...
nx-X11/programs/Xserver/hw/nxagent/Dialog.h
View file @
22914447
...
...
@@ -42,7 +42,7 @@ extern int nxagentKillDialogPid;
extern
int
nxagentSuspendDialogPid
;
extern
int
nxagentRootlessDialogPid
;
extern
int
nxagentPulldownDialogPid
;
extern
int
nxagentFontsReplacement
;
extern
int
nxagentFontsReplacement
DialogPid
;
extern
int
nxagentEnableRandRModeDialogPid
;
extern
int
nxagentDisableRandRModeDialogPid
;
extern
int
nxagentEnableDeferModePid
;
...
...
nx-X11/programs/Xserver/hw/nxagent/Display.c
View file @
22914447
...
...
@@ -453,6 +453,21 @@ static void nxagentSigchldHandler(int signal)
}
}
if
(
pid
==
0
&&
nxagentFontsReplacementDialogPid
)
{
pid
=
waitpid
(
nxagentFontsReplacementDialogPid
,
&
status
,
options
);
if
(
pid
==
-
1
&&
errno
==
ECHILD
)
{
#ifdef WARNING
fprintf
(
stderr
,
"nxagentSigchldHandler: Got ECHILD waiting for child %d (Fonts replacement).
\n
"
,
nxagentFontsReplacementDialogPid
);
#endif
pid
=
nxagentFontsReplacementDialogPid
=
0
;
}
}
if
(
pid
==
0
&&
nxagentEnableRandRModeDialogPid
)
{
pid
=
waitpid
(
nxagentEnableRandRModeDialogPid
,
&
status
,
options
);
...
...
nx-X11/programs/Xserver/hw/nxagent/GCOps.c
View file @
22914447
...
...
@@ -594,6 +594,8 @@ RegionPtr nxagentCopyArea(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable,
unsigned
int
format
;
unsigned
long
planeMask
=
0xffffffff
;
int
oldDstxyValue
;
RegionPtr
pDstRegion
;
int
skip
=
0
;
...
...
@@ -605,6 +607,91 @@ RegionPtr nxagentCopyArea(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable,
(
void
*
)
pDstDrawable
,
srcx
,
srcy
,
dstx
,
dsty
,
width
,
height
);
#endif
/*
* Here, before using fbDoCopy() called by fbCopyArea(),
* it should be provided that the cast in fbDoCopy() from
* int to short int would not cut off significative bits.
*/
if
(
dstx
+
pDstDrawable
->
x
+
width
>
32767
)
{
#ifdef WARNING
fprintf
(
stderr
,
"nxagentCopyArea: x2 exceeding short int.
\n
"
);
#endif
width
=
32767
-
dstx
-
pDstDrawable
->
x
;
if
(
width
<=
0
)
{
#ifdef TEST
fprintf
(
stderr
,
"nxagentCopyArea: Returning null on x2 check.
\n
"
);
#endif
return
NullRegion
;
}
}
if
(
dstx
+
pDstDrawable
->
x
<
-
32768
)
{
#ifdef WARNING
fprintf
(
stderr
,
"nxagentCopyArea: x1 exceeding short int.
\n
"
);
#endif
width
+=
pDstDrawable
->
x
+
dstx
+
32768
;
srcx
-=
pDstDrawable
->
x
+
dstx
+
32768
;
dstx
=
-
32768
-
pDstDrawable
->
x
;
if
(
width
<=
0
)
{
#ifdef TEST
fprintf
(
stderr
,
"nxagentCopyArea: Returning null on x1 check.
\n
"
);
#endif
return
NullRegion
;
}
}
oldDstxyValue
=
dsty
;
if
(
dsty
+
pDstDrawable
->
y
+
height
>
32767
)
{
#ifdef WARNING
fprintf
(
stderr
,
"nxagentCopyArea: y2 exceeding short int.
\n
"
);
#endif
height
=
32767
-
dsty
-
pDstDrawable
->
y
;
if
(
height
<=
0
)
{
#ifdef TEST
fprintf
(
stderr
,
"nxagentCopyArea: Returning null on y2 check.
\n
"
);
#endif
return
NullRegion
;
}
}
if
(
dsty
+
pDstDrawable
->
y
<
-
32768
)
{
#ifdef WARNING
fprintf
(
stderr
,
"nxagentCopyArea: y1 exceeding short int.
\n
"
);
#endif
height
+=
32768
+
pDstDrawable
->
y
+
dsty
;
srcy
-=
32768
+
pDstDrawable
->
y
+
dsty
;
dsty
=
-
32768
-
pDstDrawable
->
y
;
if
(
height
<=
0
)
{
#ifdef TEST
fprintf
(
stderr
,
"nxagentCopyArea: Returning null on y1 check.
\n
"
);
#endif
return
NullRegion
;
}
}
if
(
nxagentGCTrap
==
1
||
nxagentShmTrap
==
1
)
{
if
(
pSrcDrawable
->
type
==
DRAWABLE_PIXMAP
&&
...
...
nx-X11/programs/Xserver/hw/nxagent/Rootless.c
View file @
22914447
...
...
@@ -60,6 +60,27 @@ typedef struct
}
nxagentWMHints
;
/*
* This structure is compatible with 32
* and 64 bit library interface. It has
* been copied from Xatomtype.h and it's
* a parameter of XChangeProperty().
*/
typedef
struct
{
unsigned
long
flags
;
long
input
;
long
initialState
;
unsigned
long
iconPixmap
;
unsigned
long
iconWindow
;
long
iconX
;
long
iconY
;
unsigned
long
iconMask
;
unsigned
long
windowGroup
;
}
nxagentPropWMHints
;
WindowPtr
nxagentRootlessWindow
=
NULL
;
#define TOP_LEVEL_TABLE_UNIT 100
...
...
@@ -429,6 +450,7 @@ int nxagentExportProperty(pWin, property, type, format, mode, nUnits, value)
Atom
propertyX
,
typeX
;
char
*
output
=
NULL
;
nxagentWMHints
wmHints
;
nxagentPropWMHints
propHints
;
Bool
export
=
False
;
Bool
freeMem
=
False
;
...
...
@@ -489,8 +511,22 @@ int nxagentExportProperty(pWin, property, type, format, mode, nUnits, value)
wmHints
.
flags
|=
InputHint
;
wmHints
.
input
=
True
;
output
=
(
char
*
)
&
wmHints
;
export
=
True
;
/*
* Initialize the structure used in XChangeProperty().
*/
propHints
.
flags
=
wmHints
.
flags
;
propHints
.
input
=
(
wmHints
.
input
==
True
?
1
:
0
);
propHints
.
initialState
=
wmHints
.
initial_state
;
propHints
.
iconPixmap
=
wmHints
.
icon_pixmap
;
propHints
.
iconWindow
=
wmHints
.
icon_window
;
propHints
.
iconX
=
wmHints
.
icon_x
;
propHints
.
iconY
=
wmHints
.
icon_y
;
propHints
.
iconMask
=
wmHints
.
icon_mask
;
propHints
.
windowGroup
=
wmHints
.
window_group
;
output
=
(
char
*
)
&
propHints
;
export
=
True
;
if
((
wmHints
.
flags
&
IconPixmapHint
)
&&
(
wmHints
.
icon_pixmap
!=
None
))
{
...
...
@@ -504,17 +540,17 @@ int nxagentExportProperty(pWin, property, type, format, mode, nUnits, value)
nxagentSynchronizeRegion
((
DrawablePtr
)
icon
,
NullRegion
,
NEVER_BREAK
,
NULL
);
}
wmHints
.
icon_p
ixmap
=
nxagentPixmap
(
icon
);
propHints
.
iconP
ixmap
=
nxagentPixmap
(
icon
);
}
else
{
wm
Hints
.
flags
&=
~
IconPixmapHint
;
prop
Hints
.
flags
&=
~
IconPixmapHint
;
#ifdef WARNING
fprintf
(
stderr
,
"nxagentExportProperty: WARNING! Failed to look up icon pixmap %x from hint "
"exporting property %s type %s on window %p.
\n
"
,
(
unsigned
int
)
wmHints
.
icon_pixmap
,
propertyS
,
typeS
,
(
void
*
)
pWin
);
(
void
*
)
pWin
);
#endif
}
}
...
...
@@ -526,17 +562,17 @@ int nxagentExportProperty(pWin, property, type, format, mode, nUnits, value)
if
(
icon
)
{
wmHints
.
icon_w
indow
=
nxagentWindow
(
icon
);
propHints
.
iconW
indow
=
nxagentWindow
(
icon
);
}
else
{
wm
Hints
.
flags
&=
~
IconWindowHint
;
prop
Hints
.
flags
&=
~
IconWindowHint
;
#ifdef WARNING
fprintf
(
stderr
,
"nxagentExportProperty: WARNING! Failed to look up icon window %x from hint "
"exporting property %s type %s on window %p.
\n
"
,
(
unsigned
int
)
wmHints
.
icon_window
,
propertyS
,
typeS
,
(
void
*
)
pWin
);
(
void
*
)
pWin
);
#endif
}
}
...
...
@@ -548,17 +584,17 @@ int nxagentExportProperty(pWin, property, type, format, mode, nUnits, value)
if
(
icon
)
{
wmHints
.
icon_m
ask
=
nxagentPixmap
(
icon
);
propHints
.
iconM
ask
=
nxagentPixmap
(
icon
);
}
else
{
wm
Hints
.
flags
&=
~
IconMaskHint
;
prop
Hints
.
flags
&=
~
IconMaskHint
;
#ifdef WARNING
fprintf
(
stderr
,
"nxagentExportProperty: WARNING! Failed to look up icon mask %x from hint "
"exporting property %s type %s on window %p.
\n
"
,
(
unsigned
int
)
wmHints
.
icon_mask
,
propertyS
,
typeS
,
(
void
*
)
pWin
);
(
void
*
)
pWin
);
#endif
}
}
...
...
@@ -570,17 +606,17 @@ int nxagentExportProperty(pWin, property, type, format, mode, nUnits, value)
if
(
window
)
{
wmHints
.
window_g
roup
=
nxagentWindow
(
window
);
propHints
.
windowG
roup
=
nxagentWindow
(
window
);
}
else
{
wm
Hints
.
flags
&=
~
WindowGroupHint
;
prop
Hints
.
flags
&=
~
WindowGroupHint
;
#ifdef WARNING
fprintf
(
stderr
,
"nxagentExportProperty: WARNING! Failed to look up window group %x from hint "
"exporting property %s type %s on window %p.
\n
"
,
(
unsigned
int
)
wmHints
.
window_group
,
propertyS
,
typeS
,
(
void
*
)
pWin
);
(
void
*
)
pWin
);
#endif
}
}
...
...
nx-X11/programs/Xserver/hw/nxagent/Screen.c
View file @
22914447
...
...
@@ -3045,7 +3045,7 @@ void nxagentShadowAdaptDepth(unsigned int width, unsigned int height,
#ifdef WARNING
fprintf
(
stderr
,
"nxagentCorrectDepthShadow: WARNING! Visual not found. Using default visual.
\n
"
);
#endif
pVisual
=
nxagentVisuals
[
nxagentDefaultVisualIndex
].
visual
;
}
...
...
@@ -3472,10 +3472,10 @@ int nxagentRRSetScreenConfig(ScreenPtr pScreen, int width, int height)
RRScreenSizePtr
oldSizes
;
pScrPriv
=
rrGetScrPriv
(
pScreen
);
oldWidth
=
pScreen
->
width
;
oldHeight
=
pScreen
->
height
;
if
(
!
pScrPriv
)
{
return
1
;
...
...
@@ -3555,7 +3555,7 @@ int nxagentRRSetScreenConfig(ScreenPtr pScreen, int width, int height)
}
RREditConnectionInfo
(
pScreen
);
/*
* Fix pointer bounds and location
*/
...
...
@@ -3693,7 +3693,8 @@ void nxagentSaveAreas(PixmapPtr pPixmap, RegionPtr prgnSave, int xorg, int yorg,
return
;
}
void
nxagentRestoreAreas
(
PixmapPtr
pPixmap
,
RegionPtr
prgnRestore
,
int
xorg
,
int
yorg
,
WindowPtr
pWin
)
void
nxagentRestoreAreas
(
PixmapPtr
pPixmap
,
RegionPtr
prgnRestore
,
int
xorg
,
int
yorg
,
WindowPtr
pWin
)
{
PixmapPtr
pVirtualPixmap
;
RegionPtr
clipRegion
;
...
...
@@ -3709,6 +3710,14 @@ void nxagentRestoreAreas(PixmapPtr pPixmap, RegionPtr prgnRestore, int xorg, int
BoxRec
extents
;
miBSWindowPtr
pBackingStore
;
/*
* Limit the area to restore to the
* root window size.
*/
REGION_INTERSECT
(
pWin
->
pScreen
,
prgnRestore
,
prgnRestore
,
&
WindowTable
[
pWin
->
drawable
.
pScreen
->
myNum
]
->
winSize
);
pBackingStore
=
(
miBSWindowPtr
)
pWin
->
backStorage
;
pVirtualPixmap
=
nxagentVirtualPixmap
(
pPixmap
);
...
...
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