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
6dcfcbab
Commit
6dcfcbab
authored
Feb 03, 2018
by
Ulrich Sibiller
Committed by
Mihai Moldovan
Feb 26, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Transfer previous dix changes into hw/nxagent
parent
1b54f646
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
21 deletions
+31
-21
NXwindow.c
nx-X11/programs/Xserver/hw/nxagent/NXwindow.c
+31
-21
No files found.
nx-X11/programs/Xserver/hw/nxagent/NXwindow.c
View file @
6dcfcbab
...
@@ -138,9 +138,7 @@ extern void nxagentSetVersionProperty(WindowPtr pWin);
...
@@ -138,9 +138,7 @@ extern void nxagentSetVersionProperty(WindowPtr pWin);
void
nxagentClearSplash
(
WindowPtr
pW
)
void
nxagentClearSplash
(
WindowPtr
pW
)
{
{
ScreenPtr
pScreen
;
ScreenPtr
pScreen
=
pW
->
drawable
.
pScreen
;
pScreen
=
pW
->
drawable
.
pScreen
;
if
(
pW
->
backgroundState
==
BackgroundPixmap
)
if
(
pW
->
backgroundState
==
BackgroundPixmap
)
{
{
...
@@ -189,9 +187,6 @@ MakeRootTile(WindowPtr pWin)
...
@@ -189,9 +187,6 @@ MakeRootTile(WindowPtr pWin)
for
(
j
=
len
;
j
>
0
;
j
--
)
for
(
j
=
len
;
j
>
0
;
j
--
)
*
to
++
=
*
from
;
*
to
++
=
*
from
;
if
(
blackRoot
)
bzero
(
back
,
sizeof
(
back
));
(
*
pGC
->
ops
->
PutImage
)((
DrawablePtr
)
pWin
->
background
.
pixmap
,
pGC
,
1
,
(
*
pGC
->
ops
->
PutImage
)((
DrawablePtr
)
pWin
->
background
.
pixmap
,
pGC
,
1
,
0
,
0
,
len
,
4
,
0
,
XYBitmap
,
(
char
*
)
back
);
0
,
0
,
len
,
4
,
0
,
XYBitmap
,
(
char
*
)
back
);
...
@@ -203,7 +198,8 @@ MakeRootTile(WindowPtr pWin)
...
@@ -203,7 +198,8 @@ MakeRootTile(WindowPtr pWin)
void
void
InitRootWindow
(
WindowPtr
pWin
)
InitRootWindow
(
WindowPtr
pWin
)
{
{
ScreenPtr
pScreen
;
ScreenPtr
pScreen
=
pWin
->
drawable
.
pScreen
;
int
backFlag
=
CWBorderPixel
|
CWCursor
|
CWBackingStore
;
#ifdef TEST
#ifdef TEST
fprintf
(
stderr
,
"InitRootWindow: Called for window at [%p][%ld] with parent [%p].
\n
"
,
fprintf
(
stderr
,
"InitRootWindow: Called for window at [%p][%ld] with parent [%p].
\n
"
,
...
@@ -220,8 +216,6 @@ InitRootWindow(WindowPtr pWin)
...
@@ -220,8 +216,6 @@ InitRootWindow(WindowPtr pWin)
nxagentRootlessWindow
=
pWin
;
nxagentRootlessWindow
=
pWin
;
}
}
pScreen
=
pWin
->
drawable
.
pScreen
;
/*
/*
* A root window is created for each screen by main
* A root window is created for each screen by main
* and the pointer is saved in screenInfo.screens as
* and the pointer is saved in screenInfo.screens as
...
@@ -254,20 +248,34 @@ InitRootWindow(WindowPtr pWin)
...
@@ -254,20 +248,34 @@ InitRootWindow(WindowPtr pWin)
pWin
->
cursorIsNone
=
FALSE
;
pWin
->
cursorIsNone
=
FALSE
;
pWin
->
optional
->
cursor
=
rootCursor
;
pWin
->
optional
->
cursor
=
rootCursor
;
rootCursor
->
refcnt
++
;
rootCursor
->
refcnt
++
;
#ifdef NXAGENT_SPLASH
if
(
blackRoot
)
pWin
->
background
.
pixel
=
pScreen
->
blackPixel
;
else
pWin
->
background
.
pixel
=
pScreen
->
whitePixel
;
backFlag
|=
CWBackPixel
;
MakeRootTile
(
pWin
);
#else
if
(
!
blackRoot
&&
!
whiteRoot
)
{
MakeRootTile
(
pWin
);
backFlag
|=
CWBackPixmap
;
}
else
{
if
(
blackRoot
)
pWin
->
background
.
pixel
=
pScreen
->
blackPixel
;
else
pWin
->
background
.
pixel
=
pScreen
->
whitePixel
;
backFlag
|=
CWBackPixel
;
}
#endif
pWin
->
backingStore
=
defaultBackingStore
;
pWin
->
backingStore
=
defaultBackingStore
;
pWin
->
forcedBS
=
(
defaultBackingStore
!=
NotUseful
);
pWin
->
forcedBS
=
(
defaultBackingStore
!=
NotUseful
);
#ifdef NXAGENT_SPLASH
/* We SHOULD check for an error value here XXX */
/* We SHOULD check for an error value here XXX */
pWin
->
background
.
pixel
=
pScreen
->
blackPixel
;
(
*
pScreen
->
ChangeWindowAttributes
)(
pWin
,
backFlag
);
(
*
pScreen
->
ChangeWindowAttributes
)(
pWin
,
CWBackPixel
|
CWBorderPixel
|
CWCursor
|
CWBackingStore
);
#else
(
*
pScreen
->
ChangeWindowAttributes
)(
pWin
,
CWBackPixmap
|
CWBorderPixel
|
CWCursor
|
CWBackingStore
);
#endif
MakeRootTile
(
pWin
);
/*
/*
* Map both the root and the default agent window.
* Map both the root and the default agent window.
...
@@ -310,6 +318,7 @@ DeleteWindow(void * value, XID wid)
...
@@ -310,6 +318,7 @@ DeleteWindow(void * value, XID wid)
{
{
register
WindowPtr
pParent
;
register
WindowPtr
pParent
;
register
WindowPtr
pWin
=
(
WindowPtr
)
value
;
register
WindowPtr
pWin
=
(
WindowPtr
)
value
;
xEvent
event
;
UnmapWindow
(
pWin
,
FALSE
);
UnmapWindow
(
pWin
,
FALSE
);
...
@@ -318,7 +327,7 @@ DeleteWindow(void * value, XID wid)
...
@@ -318,7 +327,7 @@ DeleteWindow(void * value, XID wid)
pParent
=
pWin
->
parent
;
pParent
=
pWin
->
parent
;
if
(
wid
&&
pParent
&&
SubStrSend
(
pWin
,
pParent
))
if
(
wid
&&
pParent
&&
SubStrSend
(
pWin
,
pParent
))
{
{
xEvent
event
=
{
0
}
;
memset
(
&
event
,
0
,
sizeof
(
xEvent
))
;
event
.
u
.
u
.
type
=
DestroyNotify
;
event
.
u
.
u
.
type
=
DestroyNotify
;
event
.
u
.
destroyNotify
.
window
=
pWin
->
drawable
.
id
;
event
.
u
.
destroyNotify
.
window
=
pWin
->
drawable
.
id
;
DeliverEvents
(
pWin
,
&
event
,
1
,
NullWindow
);
DeliverEvents
(
pWin
,
&
event
,
1
,
NullWindow
);
...
@@ -945,6 +954,7 @@ int
...
@@ -945,6 +954,7 @@ int
UnmapWindow
(
register
WindowPtr
pWin
,
Bool
fromConfigure
)
UnmapWindow
(
register
WindowPtr
pWin
,
Bool
fromConfigure
)
{
{
register
WindowPtr
pParent
;
register
WindowPtr
pParent
;
xEvent
event
;
Bool
wasRealized
=
(
Bool
)
pWin
->
realized
;
Bool
wasRealized
=
(
Bool
)
pWin
->
realized
;
Bool
wasViewable
=
(
Bool
)
pWin
->
viewable
;
Bool
wasViewable
=
(
Bool
)
pWin
->
viewable
;
ScreenPtr
pScreen
=
pWin
->
drawable
.
pScreen
;
ScreenPtr
pScreen
=
pWin
->
drawable
.
pScreen
;
...
@@ -962,7 +972,7 @@ UnmapWindow(register WindowPtr pWin, Bool fromConfigure)
...
@@ -962,7 +972,7 @@ UnmapWindow(register WindowPtr pWin, Bool fromConfigure)
return
(
Success
);
return
(
Success
);
if
(
SubStrSend
(
pWin
,
pParent
)
&&
MapUnmapEventsEnabled
(
pWin
))
if
(
SubStrSend
(
pWin
,
pParent
)
&&
MapUnmapEventsEnabled
(
pWin
))
{
{
xEvent
event
=
{
0
}
;
memset
(
&
event
,
0
,
sizeof
(
xEvent
))
;
event
.
u
.
u
.
type
=
UnmapNotify
;
event
.
u
.
u
.
type
=
UnmapNotify
;
event
.
u
.
unmapNotify
.
window
=
pWin
->
drawable
.
id
;
event
.
u
.
unmapNotify
.
window
=
pWin
->
drawable
.
id
;
event
.
u
.
unmapNotify
.
fromConfigure
=
fromConfigure
;
event
.
u
.
unmapNotify
.
fromConfigure
=
fromConfigure
;
...
...
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