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
3eb944c0
Commit
3eb944c0
authored
Apr 22, 2022
by
Paul Gofman
Committed by
Alexandre Julliard
Apr 25, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11.drv: Treat invalid icon as no icon in fetch_icon_data().
Signed-off-by:
Paul Gofman
<
pgofman@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
39153c98
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
7 deletions
+15
-7
window.c
dlls/winex11.drv/window.c
+15
-7
No files found.
dlls/winex11.drv/window.c
View file @
3eb944c0
...
...
@@ -598,6 +598,11 @@ failed:
}
static
HICON
get_icon_info
(
HICON
icon
,
ICONINFO
*
ii
)
{
return
icon
&&
NtUserGetIconInfo
(
icon
,
ii
,
NULL
,
NULL
,
NULL
,
0
)
?
icon
:
NULL
;
}
/***********************************************************************
* fetch_icon_data
*/
...
...
@@ -612,21 +617,24 @@ static void fetch_icon_data( HWND hwnd, HICON icon_big, HICON icon_small )
if
(
!
icon_big
)
{
icon_big
=
(
HICON
)
send_message
(
hwnd
,
WM_GETICON
,
ICON_BIG
,
0
);
if
(
!
icon_big
)
icon_big
=
(
HICON
)
NtUserGetClassLongPtrW
(
hwnd
,
GCLP_HICON
);
if
(
!
icon_big
)
icon_big
=
LoadIconW
(
0
,
(
LPWSTR
)
IDI_WINLOGO
);
icon_big
=
get_icon_info
(
(
HICON
)
send_message
(
hwnd
,
WM_GETICON
,
ICON_BIG
,
0
),
&
ii
);
if
(
!
icon_big
)
icon_big
=
get_icon_info
(
(
HICON
)
NtUserGetClassLongPtrW
(
hwnd
,
GCLP_HICON
),
&
ii
);
if
(
!
icon_big
)
icon_big
=
get_icon_info
(
LoadIconW
(
0
,
(
LPWSTR
)
IDI_WINLOGO
),
&
ii
);
}
if
(
!
icon_small
)
{
icon_small
=
(
HICON
)
send_message
(
hwnd
,
WM_GETICON
,
ICON_SMALL
,
0
);
if
(
!
icon_small
)
icon_small
=
(
HICON
)
NtUserGetClassLongPtrW
(
hwnd
,
GCLP_HICONSM
);
icon_small
=
get_icon_info
(
(
HICON
)
send_message
(
hwnd
,
WM_GETICON
,
ICON_SMALL
,
0
),
&
ii_small
);
if
(
!
icon_small
)
icon_small
=
get_icon_info
(
(
HICON
)
NtUserGetClassLongPtrW
(
hwnd
,
GCLP_HICONSM
),
&
ii_small
);
}
if
(
!
NtUserGetIconInfo
(
icon_big
,
&
ii
,
NULL
,
NULL
,
NULL
,
0
)
)
return
;
if
(
!
icon_big
)
return
;
hDC
=
NtGdiCreateCompatibleDC
(
0
);
bits
=
get_bitmap_argb
(
hDC
,
ii
.
hbmColor
,
ii
.
hbmMask
,
&
size
);
if
(
bits
&&
NtUserGetIconInfo
(
icon_small
,
&
ii_small
,
NULL
,
NULL
,
NULL
,
0
)
)
if
(
bits
&&
icon_small
)
{
unsigned
int
size_small
;
unsigned
long
*
bits_small
,
*
new
;
...
...
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