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
5c487527
Commit
5c487527
authored
May 14, 2015
by
Alex Henrie
Committed by
Alexandre Julliard
May 14, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Fall back to downscaling the big icon for ICON_SMALL2.
parent
0768a62f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
10 deletions
+32
-10
defwnd.c
dlls/user32/defwnd.c
+23
-1
win.c
dlls/user32/tests/win.c
+6
-9
win.c
dlls/user32/win.c
+2
-0
win.h
dlls/user32/win.h
+1
-0
No files found.
dlls/user32/defwnd.c
View file @
5c487527
...
...
@@ -605,10 +605,32 @@ static LRESULT DEFWND_DefWinProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa
{
case
ICON_SMALL
:
ret
=
wndPtr
->
hIconSmall
;
if
(
ret
&&
!
lParam
&&
wndPtr
->
hIcon
)
{
wndPtr
->
hIconSmall2
=
CopyImage
(
wndPtr
->
hIcon
,
IMAGE_ICON
,
GetSystemMetrics
(
SM_CXSMICON
),
GetSystemMetrics
(
SM_CYSMICON
),
0
);
}
else
if
(
lParam
&&
wndPtr
->
hIconSmall2
)
{
DestroyIcon
(
wndPtr
->
hIconSmall2
);
wndPtr
->
hIconSmall2
=
NULL
;
}
wndPtr
->
hIconSmall
=
(
HICON
)
lParam
;
break
;
case
ICON_BIG
:
ret
=
wndPtr
->
hIcon
;
if
(
wndPtr
->
hIconSmall2
)
{
DestroyIcon
(
wndPtr
->
hIconSmall2
);
wndPtr
->
hIconSmall2
=
NULL
;
}
if
(
lParam
&&
!
wndPtr
->
hIconSmall
)
{
wndPtr
->
hIconSmall2
=
CopyImage
(
(
HICON
)
lParam
,
IMAGE_ICON
,
GetSystemMetrics
(
SM_CXSMICON
),
GetSystemMetrics
(
SM_CYSMICON
),
0
);
}
wndPtr
->
hIcon
=
(
HICON
)
lParam
;
break
;
default:
...
...
@@ -639,7 +661,7 @@ static LRESULT DEFWND_DefWinProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPa
ret
=
wndPtr
->
hIcon
;
break
;
case
ICON_SMALL2
:
ret
=
wndPtr
->
hIconSmall
;
ret
=
wndPtr
->
hIconSmall
?
wndPtr
->
hIconSmall
:
wndPtr
->
hIconSmall2
;
break
;
default:
ret
=
0
;
...
...
dlls/user32/tests/win.c
View file @
5c487527
...
...
@@ -2007,23 +2007,20 @@ static void test_icons(void)
res
=
(
HICON
)
SendMessageA
(
hwnd
,
WM_GETICON
,
ICON_SMALL
,
0
);
ok
(
res
==
0
,
"wrong small icon %p/0
\n
"
,
res
);
/* this test is XP specific */
/*res = (HICON)SendMessageA( hwnd, WM_GETICON, ICON_SMALL2, 0 );
ok( res != 0, "wrong small icon %p\n", res );*/
res
=
(
HICON
)
SendMessageA
(
hwnd
,
WM_GETICON
,
ICON_SMALL2
,
0
);
ok
(
(
res
&&
res
!=
small_icon
&&
res
!=
icon2
)
||
broken
(
!
res
),
"wrong small2 icon %p
\n
"
,
res
);
res
=
(
HICON
)
SendMessageA
(
hwnd
,
WM_SETICON
,
ICON_SMALL
,
(
LPARAM
)
icon
);
ok
(
res
==
0
,
"wrong previous small icon %p/0
\n
"
,
res
);
res
=
(
HICON
)
SendMessageA
(
hwnd
,
WM_GETICON
,
ICON_SMALL
,
0
);
ok
(
res
==
icon
,
"wrong small icon after set %p/%p
\n
"
,
res
,
icon
);
/* this test is XP specific */
/*res = (HICON)SendMessageA( hwnd, WM_GETICON, ICON_SMALL2, 0 );
ok( res == icon, "wrong small icon after set %p/%p\n", res, icon );*/
res
=
(
HICON
)
SendMessageA
(
hwnd
,
WM_GETICON
,
ICON_SMALL2
,
0
);
ok
(
res
==
icon
||
broken
(
!
res
),
"wrong small2 icon after set %p/%p
\n
"
,
res
,
icon
);
res
=
(
HICON
)
SendMessageA
(
hwnd
,
WM_SETICON
,
ICON_SMALL
,
(
LPARAM
)
small_icon
);
ok
(
res
==
icon
,
"wrong previous small icon %p/%p
\n
"
,
res
,
icon
);
res
=
(
HICON
)
SendMessageA
(
hwnd
,
WM_GETICON
,
ICON_SMALL
,
0
);
ok
(
res
==
small_icon
,
"wrong small icon after set %p/%p
\n
"
,
res
,
small_icon
);
/* this test is XP specific */
/*res = (HICON)SendMessageA( hwnd, WM_GETICON, ICON_SMALL2, 0 );
ok( res == small_icon, "wrong small icon after set %p/%p\n", res, small_icon );*/
res
=
(
HICON
)
SendMessageA
(
hwnd
,
WM_GETICON
,
ICON_SMALL2
,
0
);
ok
(
res
==
small_icon
||
broken
(
!
res
),
"wrong small2 icon after set %p/%p
\n
"
,
res
,
small_icon
);
/* make sure the big icon hasn't changed */
res
=
(
HICON
)
SendMessageA
(
hwnd
,
WM_GETICON
,
ICON_BIG
,
0
);
...
...
dlls/user32/win.c
View file @
5c487527
...
...
@@ -978,6 +978,7 @@ LRESULT WIN_DestroyWindow( HWND hwnd )
wndPtr
->
text
=
NULL
;
HeapFree
(
GetProcessHeap
(),
0
,
wndPtr
->
pScroll
);
wndPtr
->
pScroll
=
NULL
;
DestroyIcon
(
wndPtr
->
hIconSmall2
);
surface
=
wndPtr
->
surface
;
wndPtr
->
surface
=
NULL
;
WIN_ReleasePtr
(
wndPtr
);
...
...
@@ -1468,6 +1469,7 @@ HWND WIN_CreateWindowEx( CREATESTRUCTW *cs, LPCWSTR className, HINSTANCE module,
wndPtr
->
userdata
=
0
;
wndPtr
->
hIcon
=
0
;
wndPtr
->
hIconSmall
=
0
;
wndPtr
->
hIconSmall2
=
0
;
wndPtr
->
hSysMenu
=
0
;
wndPtr
->
min_pos
.
x
=
wndPtr
->
min_pos
.
y
=
-
1
;
...
...
dlls/user32/win.h
View file @
5c487527
...
...
@@ -60,6 +60,7 @@ typedef struct tagWND
HMENU
hSysMenu
;
/* window's copy of System Menu */
HICON
hIcon
;
/* window's icon */
HICON
hIconSmall
;
/* window's small icon */
HICON
hIconSmall2
;
/* window's secondary small icon, derived from hIcon */
struct
window_surface
*
surface
;
/* Window surface if any */
struct
tagDIALOGINFO
*
dlgInfo
;
/* Dialog additional info (dialogs only) */
int
pixel_format
;
/* Pixel format set by the graphics driver */
...
...
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