Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
077c2732
Commit
077c2732
authored
Feb 19, 1999
by
Ove Kaaven
Committed by
Alexandre Julliard
Feb 19, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added extra child arguments to DCE_GetVisRgn() to be able to handle
PARENTDC class style combined with CLIPCHILDREN window style, to prevent mis-redraws in Free Agent 16-bit.
parent
17d0d4e8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
7 deletions
+35
-7
dce.h
include/dce.h
+1
-1
dce.c
windows/dce.c
+32
-4
winpos.c
windows/winpos.c
+2
-2
No files found.
include/dce.h
View file @
077c2732
...
...
@@ -51,7 +51,7 @@ extern DCE* DCE_AllocDCE( HWND32 hWnd, DCE_TYPE type );
extern
DCE
*
DCE_FreeDCE
(
DCE
*
dce
);
extern
void
DCE_FreeWindowDCE
(
WND
*
);
extern
INT16
DCE_ExcludeRgn
(
HDC32
,
WND
*
,
HRGN32
);
extern
HRGN32
DCE_GetVisRgn
(
HWND32
,
WORD
);
extern
HRGN32
DCE_GetVisRgn
(
HWND32
,
WORD
,
HWND32
,
WORD
);
extern
BOOL32
DCE_InvalidateDCE
(
WND
*
,
const
RECT32
*
);
#endif
/* __WINE_DCE_H */
windows/dce.c
View file @
077c2732
...
...
@@ -410,11 +410,12 @@ static BOOL32 DCE_AddClipRects( WND *pWndStart, WND *pWndEnd,
* clipped by the client area of all ancestors, and then optionally
* by siblings and children.
*/
HRGN32
DCE_GetVisRgn
(
HWND32
hwnd
,
WORD
flags
)
HRGN32
DCE_GetVisRgn
(
HWND32
hwnd
,
WORD
flags
,
HWND32
hwndChild
,
WORD
cflags
)
{
HRGN32
hrgnVis
=
0
;
RECT32
rect
;
WND
*
wndPtr
=
WIN_FindWndPtr
(
hwnd
);
WND
*
childWnd
=
WIN_FindWndPtr
(
hwndChild
);
/* Get visible rectangle and create a region with it. */
...
...
@@ -449,6 +450,32 @@ HRGN32 DCE_GetVisRgn( HWND32 hwnd, WORD flags )
&
rect
,
xoffset
,
yoffset
);
}
/* We may need to clip children of child window, if a window with PARENTDC
* class style and CLIPCHILDREN window style (like in Free Agent 16
* preference dialogs) gets here, we take the region for the parent window
* but apparently still need to clip the children of the child window... */
if
(
(
cflags
&
DCX_CLIPCHILDREN
)
&&
childWnd
&&
childWnd
->
child
)
{
if
(
flags
&
DCX_WINDOW
)
{
/* adjust offsets since child window rectangles are
* in client coordinates */
xoffset
=
wndPtr
->
rectClient
.
left
-
wndPtr
->
rectWindow
.
left
;
yoffset
=
wndPtr
->
rectClient
.
top
-
wndPtr
->
rectWindow
.
top
;
}
else
xoffset
=
yoffset
=
0
;
/* client coordinates of child window */
xoffset
+=
childWnd
->
rectClient
.
left
;
yoffset
+=
childWnd
->
rectClient
.
top
;
DCE_AddClipRects
(
childWnd
->
child
,
NULL
,
hrgnClip
,
&
rect
,
xoffset
,
yoffset
);
}
/* sibling window rectangles are in client
* coordinates of the parent window */
...
...
@@ -714,7 +741,8 @@ HDC32 WINAPI GetDCEx32( HWND32 hwnd, HRGN32 hrgnClip, DWORD flags )
else
dcxFlags
=
flags
&
~
(
DCX_CLIPSIBLINGS
|
DCX_CLIPCHILDREN
|
DCX_WINDOW
);
hrgnVisible
=
DCE_GetVisRgn
(
parentPtr
->
hwndSelf
,
dcxFlags
);
hrgnVisible
=
DCE_GetVisRgn
(
parentPtr
->
hwndSelf
,
dcxFlags
,
wndPtr
->
hwndSelf
,
flags
);
if
(
flags
&
DCX_WINDOW
)
OffsetRgn32
(
hrgnVisible
,
-
wndPtr
->
rectWindow
.
left
,
-
wndPtr
->
rectWindow
.
top
);
...
...
@@ -733,7 +761,7 @@ HDC32 WINAPI GetDCEx32( HWND32 hwnd, HRGN32 hrgnClip, DWORD flags )
SYSMETRICS_CYSCREEN
);
else
{
hrgnVisible
=
DCE_GetVisRgn
(
hwnd
,
flags
);
hrgnVisible
=
DCE_GetVisRgn
(
hwnd
,
flags
,
0
,
0
);
DCE_OffsetVisRgn
(
hdc
,
hrgnVisible
);
}
...
...
@@ -874,7 +902,7 @@ BOOL16 WINAPI DCHook( HDC16 hDC, WORD code, DWORD data, LPARAM lParam )
if
(
dce
->
DCXflags
&
DCX_DCEBUSY
)
{
SetHookFlags
(
hDC
,
DCHF_VALIDATEVISRGN
);
hVisRgn
=
DCE_GetVisRgn
(
dce
->
hwndCurrent
,
dce
->
DCXflags
);
hVisRgn
=
DCE_GetVisRgn
(
dce
->
hwndCurrent
,
dce
->
DCXflags
,
0
,
0
);
TRACE
(
dc
,
"
\t
applying saved clipRgn
\n
"
);
...
...
windows/winpos.c
View file @
077c2732
...
...
@@ -2045,7 +2045,7 @@ static UINT32 WINPOS_SizeMoveClean( WND* Wnd, HRGN32 oldVisRgn,
LPRECT32
lpOldWndRect
,
LPRECT32
lpOldClientRect
,
UINT32
uFlags
)
{
HRGN32
newVisRgn
=
DCE_GetVisRgn
(
Wnd
->
hwndSelf
,
DCX_WINDOW
|
DCX_CLIPSIBLINGS
);
HRGN32
newVisRgn
=
DCE_GetVisRgn
(
Wnd
->
hwndSelf
,
DCX_WINDOW
|
DCX_CLIPSIBLINGS
,
0
,
0
);
HRGN32
dirtyRgn
=
CreateRectRgn32
(
0
,
0
,
0
,
0
);
int
other
,
my
;
...
...
@@ -2333,7 +2333,7 @@ BOOL32 WINAPI SetWindowPos32( HWND32 hwnd, HWND32 hwndInsertAfter,
if
(
!
X11DRV_WND_GetXWindow
(
wndPtr
)
&&
!
(
winpos
.
flags
&
SWP_NOREDRAW
)
&&
((
winpos
.
flags
&
(
SWP_NOMOVE
|
SWP_NOSIZE
|
SWP_FRAMECHANGED
))
!=
(
SWP_NOMOVE
|
SWP_NOSIZE
))
)
visRgn
=
DCE_GetVisRgn
(
hwnd
,
DCX_WINDOW
|
DCX_CLIPSIBLINGS
);
visRgn
=
DCE_GetVisRgn
(
hwnd
,
DCX_WINDOW
|
DCX_CLIPSIBLINGS
,
0
,
0
);
/* Send WM_NCCALCSIZE message to get new client area */
if
(
(
winpos
.
flags
&
(
SWP_FRAMECHANGED
|
SWP_NOSIZE
))
!=
SWP_NOSIZE
)
...
...
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