Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
1775ab4a
Commit
1775ab4a
authored
Sep 24, 2009
by
Rein Klazes
Committed by
Alexandre Julliard
Sep 24, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: In ScrollWindowEx do not clip the clipping rectangle with the scrolling rectangle.
parent
e430838e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
53 additions
and
1 deletion
+53
-1
painting.c
dlls/user32/painting.c
+2
-1
win.c
dlls/user32/tests/win.c
+51
-0
No files found.
dlls/user32/painting.c
View file @
1775ab4a
...
...
@@ -1404,11 +1404,12 @@ INT WINAPI ScrollWindowEx( HWND hwnd, INT dx, INT dy,
hwnd
=
WIN_GetFullHandle
(
hwnd
);
GetClientRect
(
hwnd
,
&
rc
);
if
(
rect
)
IntersectRect
(
&
rc
,
&
rc
,
rect
);
if
(
clipRect
)
IntersectRect
(
&
cliprc
,
&
rc
,
clipRect
);
else
cliprc
=
rc
;
if
(
rect
)
IntersectRect
(
&
rc
,
&
rc
,
rect
);
if
(
hrgnUpdate
)
bOwnRgn
=
FALSE
;
else
if
(
bUpdate
)
hrgnUpdate
=
CreateRectRgn
(
0
,
0
,
0
,
0
);
...
...
dlls/user32/tests/win.c
View file @
1775ab4a
...
...
@@ -3218,6 +3218,56 @@ static void test_window_styles(void)
check_window_style
(
0
,
WS_EX_APPWINDOW
,
WS_CLIPSIBLINGS
|
WS_CAPTION
,
WS_EX_APPWINDOW
|
WS_EX_WINDOWEDGE
);
}
static
void
test_scrollwindow
(
HWND
hwnd
)
{
HDC
hdc
;
RECT
rc
,
rc2
,
rc3
;
COLORREF
colr
;
ShowWindow
(
hwnd
,
SW_SHOW
);
UpdateWindow
(
hwnd
);
GetClientRect
(
hwnd
,
&
rc
);
hdc
=
GetDC
(
hwnd
);
/* test ScrollWindow(Ex) with no clip rectangle */
/* paint the lower half of the window black */
rc2
=
rc
;
rc2
.
top
=
(
rc2
.
top
+
rc2
.
bottom
)
/
2
;
FillRect
(
hdc
,
&
rc2
,
GetStockObject
(
BLACK_BRUSH
));
/* paint the upper half of the window white */
rc2
.
bottom
=
rc2
.
top
;
rc2
.
top
=
0
;
FillRect
(
hdc
,
&
rc2
,
GetStockObject
(
WHITE_BRUSH
));
/* scroll lower half up */
rc2
=
rc
;
rc2
.
top
=
(
rc2
.
top
+
rc2
.
bottom
)
/
2
;
ScrollWindowEx
(
hwnd
,
0
,
-
rc2
.
top
,
&
rc2
,
NULL
,
NULL
,
NULL
,
SW_ERASE
);
/* expected: black should have scrolled to the upper half */
colr
=
GetPixel
(
hdc
,
(
rc2
.
left
+
rc2
.
right
)
/
2
,
rc2
.
bottom
/
4
);
ok
(
colr
==
0
,
"pixel should be black, color is %08x
\n
"
,
colr
);
/* Repeat that test of ScrollWindow(Ex) now with clip rectangle */
/* paint the lower half of the window black */
rc2
=
rc
;
rc2
.
top
=
(
rc2
.
top
+
rc2
.
bottom
)
/
2
;
FillRect
(
hdc
,
&
rc2
,
GetStockObject
(
BLACK_BRUSH
));
/* paint the upper half of the window white */
rc2
.
bottom
=
rc2
.
top
;
rc2
.
top
=
0
;
FillRect
(
hdc
,
&
rc2
,
GetStockObject
(
WHITE_BRUSH
));
/* scroll lower half up */
rc2
=
rc
;
rc2
.
top
=
(
rc2
.
top
+
rc2
.
bottom
)
/
2
;
rc3
=
rc
;
rc3
.
left
=
rc3
.
right
/
4
;
rc3
.
right
-=
rc3
.
right
/
4
;
ScrollWindowEx
(
hwnd
,
0
,
-
rc2
.
top
,
&
rc2
,
&
rc3
,
NULL
,
NULL
,
SW_ERASE
);
/* expected: black should have scrolled to the upper half */
colr
=
GetPixel
(
hdc
,
(
rc2
.
left
+
rc2
.
right
)
/
2
,
rc2
.
bottom
/
4
);
ok
(
colr
==
0
,
"pixel should be black, color is %08x
\n
"
,
colr
);
/* clean up */
ReleaseDC
(
hwnd
,
hdc
);
}
static
void
test_scrollvalidate
(
HWND
parent
)
{
HDC
hdc
;
...
...
@@ -5724,6 +5774,7 @@ START_TEST(win)
test_mouse_input
(
hwndMain
);
test_validatergn
(
hwndMain
);
test_nccalcscroll
(
hwndMain
);
test_scrollwindow
(
hwndMain
);
test_scrollvalidate
(
hwndMain
);
test_scrolldc
(
hwndMain
);
test_scroll
();
...
...
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