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
b47debdd
Commit
b47debdd
authored
Nov 03, 2011
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Return the original brush data in GetObject.
parent
a16dbbe3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
11 deletions
+10
-11
brush.c
dlls/gdi32/brush.c
+2
-3
brush.c
dlls/gdi32/tests/brush.c
+8
-8
No files found.
dlls/gdi32/brush.c
View file @
b47debdd
...
...
@@ -161,7 +161,6 @@ HBRUSH WINAPI CreateBrushIndirect( const LOGBRUSH * brush )
case
BS_PATTERN
:
ptr
->
bitmap
=
BITMAP_CopyBitmap
(
(
HBITMAP
)
ptr
->
logbrush
.
lbHatch
);
if
(
!
ptr
->
bitmap
)
goto
error
;
ptr
->
logbrush
.
lbHatch
=
(
ULONG_PTR
)
ptr
->
bitmap
;
ptr
->
logbrush
.
lbColor
=
0
;
break
;
...
...
@@ -176,7 +175,7 @@ HBRUSH WINAPI CreateBrushIndirect( const LOGBRUSH * brush )
if
(
!
ptr
->
info
)
goto
error
;
ptr
->
bits
.
ptr
=
(
char
*
)
ptr
->
info
+
bitmap_info_size
(
ptr
->
info
,
ptr
->
usage
);
ptr
->
logbrush
.
lbStyle
=
BS_DIBPATTERN
;
ptr
->
logbrush
.
lb
Hatch
=
(
ULONG_PTR
)
ptr
->
info
;
ptr
->
logbrush
.
lb
Color
=
0
;
break
;
case
BS_DIBPATTERN8X8
:
...
...
@@ -446,7 +445,7 @@ static HGDIOBJ BRUSH_SelectObject( HGDIOBJ handle, HDC hdc )
if
(
pattern_dev
==
dc
->
dibdrv
)
pattern_dev
=
GET_NEXT_PHYSDEV
(
physdev
,
pSelectBrush
);
BITMAP_SetOwnerDC
(
(
HBITMAP
)
brush
->
logbrush
.
lbHatch
,
pattern_dev
);
BITMAP_SetOwnerDC
(
bitmap
,
pattern_dev
);
}
info
=
brush
->
info
;
...
...
dlls/gdi32/tests/brush.c
View file @
b47debdd
...
...
@@ -100,7 +100,7 @@ static void test_pattern_brush(void)
ok
(
ret
==
sizeof
(
br
),
"wrong size %u
\n
"
,
ret
);
ok
(
br
.
lbStyle
==
BS_PATTERN
,
"wrong style %u
\n
"
,
br
.
lbStyle
);
ok
(
br
.
lbColor
==
0
,
"wrong color %u
\n
"
,
br
.
lbColor
);
todo_wine
ok
(
(
HBITMAP
)
br
.
lbHatch
==
bitmap
,
"wrong handle %p/%p
\n
"
,
(
HBITMAP
)
br
.
lbHatch
,
bitmap
);
ok
(
(
HBITMAP
)
br
.
lbHatch
==
bitmap
,
"wrong handle %p/%p
\n
"
,
(
HBITMAP
)
br
.
lbHatch
,
bitmap
);
DeleteObject
(
brush
);
br
.
lbStyle
=
BS_PATTERN8X8
;
...
...
@@ -113,7 +113,7 @@ static void test_pattern_brush(void)
ok
(
ret
==
sizeof
(
br
),
"wrong size %u
\n
"
,
ret
);
ok
(
br
.
lbStyle
==
BS_PATTERN
,
"wrong style %u
\n
"
,
br
.
lbStyle
);
ok
(
br
.
lbColor
==
0
,
"wrong color %u
\n
"
,
br
.
lbColor
);
todo_wine
ok
(
(
HBITMAP
)
br
.
lbHatch
==
bitmap
,
"wrong handle %p/%p
\n
"
,
(
HBITMAP
)
br
.
lbHatch
,
bitmap
);
ok
(
(
HBITMAP
)
br
.
lbHatch
==
bitmap
,
"wrong handle %p/%p
\n
"
,
(
HBITMAP
)
br
.
lbHatch
,
bitmap
);
ret
=
GetObjectW
(
bitmap
,
sizeof
(
dib
),
&
dib
);
ok
(
ret
==
sizeof
(
dib
.
dsBm
),
"wrong size %u
\n
"
,
ret
);
DeleteObject
(
bitmap
);
...
...
@@ -139,7 +139,7 @@ static void test_pattern_brush(void)
ok
(
ret
==
sizeof
(
br
),
"wrong size %u
\n
"
,
ret
);
ok
(
br
.
lbStyle
==
BS_PATTERN
,
"wrong style %u
\n
"
,
br
.
lbStyle
);
ok
(
br
.
lbColor
==
0
,
"wrong color %u
\n
"
,
br
.
lbColor
);
todo_wine
ok
(
(
HBITMAP
)
br
.
lbHatch
==
bitmap
,
"wrong handle %p/%p
\n
"
,
(
HBITMAP
)
br
.
lbHatch
,
bitmap
);
ok
(
(
HBITMAP
)
br
.
lbHatch
==
bitmap
,
"wrong handle %p/%p
\n
"
,
(
HBITMAP
)
br
.
lbHatch
,
bitmap
);
ret
=
GetObjectW
(
bitmap
,
sizeof
(
dib
),
&
dib
);
ok
(
ret
==
sizeof
(
dib
),
"wrong size %u
\n
"
,
ret
);
DeleteObject
(
brush
);
...
...
@@ -152,7 +152,7 @@ static void test_pattern_brush(void)
ok
(
ret
==
sizeof
(
br
),
"wrong size %u
\n
"
,
ret
);
ok
(
br
.
lbStyle
==
BS_DIBPATTERN
,
"wrong style %u
\n
"
,
br
.
lbStyle
);
ok
(
br
.
lbColor
==
0
,
"wrong color %u
\n
"
,
br
.
lbColor
);
todo_wine
ok
(
(
BITMAPINFO
*
)
br
.
lbHatch
==
info
||
broken
(
!
br
.
lbHatch
),
/* nt4 */
ok
(
(
BITMAPINFO
*
)
br
.
lbHatch
==
info
||
broken
(
!
br
.
lbHatch
),
/* nt4 */
"wrong handle %p/%p
\n
"
,
(
BITMAPINFO
*
)
br
.
lbHatch
,
info
);
DeleteObject
(
brush
);
...
...
@@ -165,8 +165,8 @@ static void test_pattern_brush(void)
ret
=
GetObjectW
(
brush
,
sizeof
(
br
),
&
br
);
ok
(
ret
==
sizeof
(
br
),
"wrong size %u
\n
"
,
ret
);
ok
(
br
.
lbStyle
==
BS_DIBPATTERN
,
"wrong style %u
\n
"
,
br
.
lbStyle
);
todo_wine
ok
(
br
.
lbColor
==
0
,
"wrong color %u
\n
"
,
br
.
lbColor
);
todo_wine
ok
(
(
BITMAPINFO
*
)
br
.
lbHatch
==
info
||
broken
(
!
br
.
lbHatch
),
/* nt4 */
ok
(
br
.
lbColor
==
0
,
"wrong color %u
\n
"
,
br
.
lbColor
);
ok
(
(
BITMAPINFO
*
)
br
.
lbHatch
==
info
||
broken
(
!
br
.
lbHatch
),
/* nt4 */
"wrong handle %p/%p
\n
"
,
(
BITMAPINFO
*
)
br
.
lbHatch
,
info
);
mem
=
GlobalAlloc
(
GMEM_MOVEABLE
,
sizeof
(
buffer
)
);
...
...
@@ -181,10 +181,10 @@ static void test_pattern_brush(void)
ret
=
GetObjectW
(
brush
,
sizeof
(
br
),
&
br
);
ok
(
ret
==
sizeof
(
br
),
"wrong size %u
\n
"
,
ret
);
ok
(
br
.
lbStyle
==
BS_DIBPATTERN
,
"wrong style %u
\n
"
,
br
.
lbStyle
);
todo_wine
ok
(
br
.
lbColor
==
0
,
"wrong color %u
\n
"
,
br
.
lbColor
);
ok
(
br
.
lbColor
==
0
,
"wrong color %u
\n
"
,
br
.
lbColor
);
ok
(
(
HGLOBAL
)
br
.
lbHatch
!=
mem
,
"wrong handle %p/%p
\n
"
,
(
HGLOBAL
)
br
.
lbHatch
,
mem
);
bits
=
GlobalLock
(
mem
);
todo_wine
ok
(
(
HGLOBAL
)
br
.
lbHatch
==
bits
||
broken
(
!
br
.
lbHatch
),
/* nt4 */
ok
(
(
HGLOBAL
)
br
.
lbHatch
==
bits
||
broken
(
!
br
.
lbHatch
),
/* nt4 */
"wrong handle %p/%p
\n
"
,
(
HGLOBAL
)
br
.
lbHatch
,
bits
);
ret
=
GlobalFlags
(
mem
);
ok
(
ret
==
2
,
"wrong flags %x
\n
"
,
ret
);
...
...
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