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
25daa0fa
Commit
25daa0fa
authored
Feb 09, 2022
by
Zhiyi Zhang
Committed by
Alexandre Julliard
Feb 09, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
uxtheme: Use tab background as dialog texture for more WM_CTLCOLOR* messages.
Signed-off-by:
Zhiyi Zhang
<
zzhang@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
f0e6cfbc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
13 deletions
+5
-13
dialog.c
dlls/uxtheme/dialog.c
+3
-0
system.c
dlls/uxtheme/tests/system.c
+2
-13
No files found.
dlls/uxtheme/dialog.c
View file @
25daa0fa
...
@@ -149,6 +149,9 @@ LRESULT WINAPI UXTHEME_DefDlgProc(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp, BOO
...
@@ -149,6 +149,9 @@ LRESULT WINAPI UXTHEME_DefDlgProc(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp, BOO
SetBrushOrgEx
(
hdc
,
old_org
.
x
,
old_org
.
y
,
NULL
);
SetBrushOrgEx
(
hdc
,
old_org
.
x
,
old_org
.
y
,
NULL
);
return
TRUE
;
return
TRUE
;
}
}
case
WM_CTLCOLORMSGBOX
:
case
WM_CTLCOLORBTN
:
case
WM_CTLCOLORDLG
:
case
WM_CTLCOLORSTATIC
:
case
WM_CTLCOLORSTATIC
:
{
{
dlgproc
=
(
WNDPROC
)
GetWindowLongPtrW
(
hwnd
,
DWLP_DLGPROC
);
dlgproc
=
(
WNDPROC
)
GetWindowLongPtrW
(
hwnd
,
DWLP_DLGPROC
);
...
...
dlls/uxtheme/tests/system.c
View file @
25daa0fa
...
@@ -1854,7 +1854,6 @@ static void test_EnableThemeDialogTexture(void)
...
@@ -1854,7 +1854,6 @@ static void test_EnableThemeDialogTexture(void)
}
}
else
else
{
{
todo_wine_if
(
msg
!=
WM_CTLCOLORSTATIC
)
ok
(
org
.
x
==
-
1
&&
org
.
y
==
-
2
,
"Expected (-1,-2), got %s.
\n
"
,
wine_dbgstr_point
(
&
org
));
ok
(
org
.
x
==
-
1
&&
org
.
y
==
-
2
,
"Expected (-1,-2), got %s.
\n
"
,
wine_dbgstr_point
(
&
org
));
}
}
...
@@ -1863,7 +1862,6 @@ static void test_EnableThemeDialogTexture(void)
...
@@ -1863,7 +1862,6 @@ static void test_EnableThemeDialogTexture(void)
ok
(
old_mode
!=
0
,
"SetBkMode failed.
\n
"
);
ok
(
old_mode
!=
0
,
"SetBkMode failed.
\n
"
);
SendMessageW
(
dialog
,
msg
,
(
WPARAM
)
child_hdc
,
(
LPARAM
)
child
);
SendMessageW
(
dialog
,
msg
,
(
WPARAM
)
child_hdc
,
(
LPARAM
)
child
);
mode
=
SetBkMode
(
child_hdc
,
old_mode
);
mode
=
SetBkMode
(
child_hdc
,
old_mode
);
todo_wine_if
(
msg
!=
WM_CTLCOLORSTATIC
)
ok
(
mode
==
TRANSPARENT
,
"Expected mode %#x, got %#x.
\n
"
,
TRANSPARENT
,
mode
);
ok
(
mode
==
TRANSPARENT
,
"Expected mode %#x, got %#x.
\n
"
,
TRANSPARENT
,
mode
);
/* Test that some WM_CTLCOLOR* messages change background color when dialog texture is on */
/* Test that some WM_CTLCOLOR* messages change background color when dialog texture is on */
...
@@ -1879,24 +1877,18 @@ static void test_EnableThemeDialogTexture(void)
...
@@ -1879,24 +1877,18 @@ static void test_EnableThemeDialogTexture(void)
memset
(
&
log_brush
,
0
,
sizeof
(
log_brush
));
memset
(
&
log_brush
,
0
,
sizeof
(
log_brush
));
count
=
GetObjectA
(
brush
,
sizeof
(
log_brush
),
&
log_brush
);
count
=
GetObjectA
(
brush
,
sizeof
(
log_brush
),
&
log_brush
);
ok
(
count
==
sizeof
(
log_brush
),
"GetObjectA failed, error %u.
\n
"
,
GetLastError
());
ok
(
count
==
sizeof
(
log_brush
),
"GetObjectA failed, error %u.
\n
"
,
GetLastError
());
todo_wine_if
(
msg
!=
WM_CTLCOLORSTATIC
)
ok
(
log_brush
.
lbColor
==
0
,
"Expected brush color %#x, got %#x.
\n
"
,
0
,
log_brush
.
lbColor
);
ok
(
log_brush
.
lbColor
==
0
,
"Expected brush color %#x, got %#x.
\n
"
,
0
,
log_brush
.
lbColor
);
todo_wine_if
(
msg
!=
WM_CTLCOLORSTATIC
)
ok
(
log_brush
.
lbStyle
==
BS_PATTERN
,
"Expected brush style %#x, got %#x.
\n
"
,
BS_PATTERN
,
ok
(
log_brush
.
lbStyle
==
BS_PATTERN
,
"Expected brush style %#x, got %#x.
\n
"
,
BS_PATTERN
,
log_brush
.
lbStyle
);
log_brush
.
lbStyle
);
memset
(
&
bmp
,
0
,
sizeof
(
bmp
));
memset
(
&
bmp
,
0
,
sizeof
(
bmp
));
count
=
GetObjectA
((
HBITMAP
)
log_brush
.
lbHatch
,
sizeof
(
bmp
),
&
bmp
);
count
=
GetObjectA
((
HBITMAP
)
log_brush
.
lbHatch
,
sizeof
(
bmp
),
&
bmp
);
todo_wine_if
(
msg
!=
WM_CTLCOLORSTATIC
)
ok
(
count
==
sizeof
(
bmp
),
"GetObjectA failed, error %u.
\n
"
,
GetLastError
());
ok
(
count
==
sizeof
(
bmp
),
"GetObjectA failed, error %u.
\n
"
,
GetLastError
());
todo_wine_if
(
msg
!=
WM_CTLCOLORSTATIC
)
ok
(
bmp
.
bmWidth
==
size
.
cx
,
"Expected width %d, got %d.
\n
"
,
size
.
cx
,
bmp
.
bmWidth
);
ok
(
bmp
.
bmWidth
==
size
.
cx
,
"Expected width %d, got %d.
\n
"
,
size
.
cx
,
bmp
.
bmWidth
);
todo_wine_if
(
msg
!=
WM_CTLCOLORSTATIC
)
ok
(
bmp
.
bmHeight
==
size
.
cy
,
"Expected height %d, got %d.
\n
"
,
size
.
cy
,
bmp
.
bmHeight
);
ok
(
bmp
.
bmHeight
==
size
.
cy
,
"Expected height %d, got %d.
\n
"
,
size
.
cy
,
bmp
.
bmHeight
);
/* Test that DefDlgProcA/W() are hooked for some WM_CTLCOLOR* messages */
/* Test that DefDlgProcA/W() are hooked for some WM_CTLCOLOR* messages */
brush
=
(
HBRUSH
)
SendMessageW
(
dialog
,
msg
,
(
WPARAM
)
child_hdc
,
(
LPARAM
)
child
);
brush
=
(
HBRUSH
)
SendMessageW
(
dialog
,
msg
,
(
WPARAM
)
child_hdc
,
(
LPARAM
)
child
);
todo_wine_if
(
msg
!=
WM_CTLCOLORSTATIC
)
ok
(
brush
!=
GetSysColorBrush
(
COLOR_BTNFACE
),
"Expected a different brush.
\n
"
);
ok
(
brush
!=
GetSysColorBrush
(
COLOR_BTNFACE
),
"Expected a different brush.
\n
"
);
brush2
=
(
HBRUSH
)
DefDlgProcW
(
dialog
,
msg
,
(
WPARAM
)
child_hdc
,
(
LPARAM
)
child
);
brush2
=
(
HBRUSH
)
DefDlgProcW
(
dialog
,
msg
,
(
WPARAM
)
child_hdc
,
(
LPARAM
)
child
);
ok
(
brush2
==
brush
,
"Expected the same brush.
\n
"
);
ok
(
brush2
==
brush
,
"Expected the same brush.
\n
"
);
...
@@ -1905,24 +1897,21 @@ static void test_EnableThemeDialogTexture(void)
...
@@ -1905,24 +1897,21 @@ static void test_EnableThemeDialogTexture(void)
/* Test that DefWindowProcA/W() are also hooked for some WM_CTLCOLOR* messages */
/* Test that DefWindowProcA/W() are also hooked for some WM_CTLCOLOR* messages */
brush
=
(
HBRUSH
)
SendMessageW
(
dialog
,
msg
,
(
WPARAM
)
child_hdc
,
(
LPARAM
)
child
);
brush
=
(
HBRUSH
)
SendMessageW
(
dialog
,
msg
,
(
WPARAM
)
child_hdc
,
(
LPARAM
)
child
);
todo_wine_if
(
msg
!=
WM_CTLCOLORSTATIC
)
ok
(
brush
!=
GetSysColorBrush
(
COLOR_BTNFACE
),
"Expected a different brush.
\n
"
);
ok
(
brush
!=
GetSysColorBrush
(
COLOR_BTNFACE
),
"Expected a different brush.
\n
"
);
if
(
msg
!=
WM_CTLCOLORDLG
)
if
(
msg
!=
WM_CTLCOLORDLG
)
{
{
brush2
=
(
HBRUSH
)
DefWindowProcW
(
dialog
,
msg
,
(
WPARAM
)
child_hdc
,
(
LPARAM
)
child
);
brush2
=
(
HBRUSH
)
DefWindowProcW
(
dialog
,
msg
,
(
WPARAM
)
child_hdc
,
(
LPARAM
)
child
);
todo_wine
_if
(
msg
==
WM_CTLCOLORSTATIC
)
todo_wine
ok
(
brush2
==
brush
,
"Expected the same brush.
\n
"
);
ok
(
brush2
==
brush
,
"Expected the same brush.
\n
"
);
brush2
=
(
HBRUSH
)
DefWindowProcA
(
dialog
,
msg
,
(
WPARAM
)
child_hdc
,
(
LPARAM
)
child
);
brush2
=
(
HBRUSH
)
DefWindowProcA
(
dialog
,
msg
,
(
WPARAM
)
child_hdc
,
(
LPARAM
)
child
);
todo_wine
_if
(
msg
==
WM_CTLCOLORSTATIC
)
todo_wine
ok
(
brush2
==
brush
,
"Expected the same brush.
\n
"
);
ok
(
brush2
==
brush
,
"Expected the same brush.
\n
"
);
}
}
else
else
{
{
brush2
=
(
HBRUSH
)
DefWindowProcW
(
dialog
,
msg
,
(
WPARAM
)
child_hdc
,
(
LPARAM
)
child
);
brush2
=
(
HBRUSH
)
DefWindowProcW
(
dialog
,
msg
,
(
WPARAM
)
child_hdc
,
(
LPARAM
)
child
);
todo_wine
ok
(
brush2
!=
brush
,
"Expected a different brush.
\n
"
);
ok
(
brush2
!=
brush
,
"Expected a different brush.
\n
"
);
brush2
=
(
HBRUSH
)
DefWindowProcA
(
dialog
,
msg
,
(
WPARAM
)
child_hdc
,
(
LPARAM
)
child
);
brush2
=
(
HBRUSH
)
DefWindowProcA
(
dialog
,
msg
,
(
WPARAM
)
child_hdc
,
(
LPARAM
)
child
);
todo_wine
ok
(
brush2
!=
brush
,
"Expected a different brush.
\n
"
);
ok
(
brush2
!=
brush
,
"Expected a different brush.
\n
"
);
}
}
...
...
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