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
9dded144
Commit
9dded144
authored
Jan 05, 2000
by
Patrik Stridvall
Committed by
Alexandre Julliard
Jan 05, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Made FillRect behave like it does on Windows
- Cleaned up WM_{,ICON}ERASEBACKGROUND default handling - Added some comments on how Windows behaves
parent
65b1f9f0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
21 deletions
+22
-21
defwnd.c
windows/defwnd.c
+9
-19
painting.c
windows/painting.c
+13
-2
No files found.
windows/defwnd.c
View file @
9dded144
...
...
@@ -21,9 +21,6 @@
DEFAULT_DEBUG_CHANNEL
(
win
)
/* Last COLOR id */
#define COLOR_MAX COLOR_GRADIENTINACTIVECAPTION
/* bits in the dwKeyData */
#define KEYDATA_ALT 0x2000
#define KEYDATA_PREVSTATE 0x4000
...
...
@@ -301,28 +298,21 @@ static LRESULT DEFWND_DefWinProc( WND *wndPtr, UINT msg, WPARAM wParam,
case
WM_ERASEBKGND
:
case
WM_ICONERASEBKGND
:
{
RECT
16
rect
;
RECT
rect
;
if
(
!
wndPtr
->
class
->
hbrBackground
)
return
0
;
/* Since WM_ERASEBKGND may receive either a window dc or a */
/* client dc, the area to be erased has to be retrieved from */
/* the device context. */
GetClipBox16
(
(
HDC16
)
wParam
,
&
rect
);
if
(
wndPtr
->
class
->
hbrBackground
<=
(
HBRUSH16
)(
COLOR_MAX
+
1
))
{
HBRUSH
hbrush
=
CreateSolidBrush
(
GetSysColor
(((
DWORD
)
wndPtr
->
class
->
hbrBackground
)
-
1
));
PaintRect16
(
GetParent16
(
wndPtr
->
hwndSelf
),
wndPtr
->
hwndSelf
,
(
HDC16
)
wParam
,
hbrush
,
&
rect
);
DeleteObject
(
hbrush
);
}
else
{
PaintRect16
(
GetParent16
(
wndPtr
->
hwndSelf
),
wndPtr
->
hwndSelf
,
(
HDC16
)
wParam
,
wndPtr
->
class
->
hbrBackground
,
&
rect
);
}
GetClipBox
(
(
HDC
)
wParam
,
&
rect
);
/* Always call the Win32 variant of FillRect even on Win16,
* since despite the fact that Win16, as well as Win32,
* supports special background brushes for a window class,
* the Win16 variant of FillRect does not.
*/
FillRect
(
(
HDC
)
wParam
,
&
rect
,
wndPtr
->
class
->
hbrBackground
);
return
1
;
}
...
...
windows/painting.c
View file @
9dded144
...
...
@@ -24,6 +24,9 @@ DECLARE_DEBUG_CHANNEL(nonclient)
(r).right = (wnd)->rectClient.right - (wnd)->rectWindow.left; \
(r).bottom = (wnd)->rectClient.bottom - (wnd)->rectWindow.top
/* Last COLOR id */
#define COLOR_MAX COLOR_GRADIENTINACTIVECAPTION
/* Last CTLCOLOR id */
#define CTLCOLOR_MAX CTLCOLOR_STATIC
...
...
@@ -568,7 +571,7 @@ static void RDW_UpdateRgns( WND* wndPtr, HRGN hRgn, UINT flags, BOOL firstRecurs
{
DeleteObject
(
wndPtr
->
hrgnUpdate
);
wndPtr
->
hrgnUpdate
=
0
;
goto
OUT
;
goto
end
;
}
}
break
;
...
...
@@ -686,7 +689,7 @@ EMPTY:
RDW_UpdateRgns
(
wnd
,
hRgn
,
flags
,
FALSE
);
}
OUT
:
end
:
/* Set/clear internal paint flag */
...
...
@@ -1228,6 +1231,10 @@ INT WINAPI ExcludeUpdateRgn( HDC hdc, HWND hwnd )
/***********************************************************************
* FillRect16 (USER.81)
* NOTE
* The Win16 variant doesn't support special color brushes like
* the Win32 one, despite the fact that Win16, as well as Win32,
* supports special background brushes for a window class.
*/
INT16
WINAPI
FillRect16
(
HDC16
hdc
,
const
RECT16
*
rect
,
HBRUSH16
hbrush
)
{
...
...
@@ -1252,6 +1259,10 @@ INT WINAPI FillRect( HDC hdc, const RECT *rect, HBRUSH hbrush )
{
HBRUSH
prevBrush
;
if
(
hbrush
<=
(
HBRUSH
)
(
COLOR_MAX
+
1
))
{
hbrush
=
GetSysColorBrush
(
(
INT
)
hbrush
-
1
);
}
if
(
!
(
prevBrush
=
SelectObject
(
hdc
,
hbrush
)))
return
0
;
PatBlt
(
hdc
,
rect
->
left
,
rect
->
top
,
rect
->
right
-
rect
->
left
,
rect
->
bottom
-
rect
->
top
,
PATCOPY
);
...
...
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