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
58e4adf0
Commit
58e4adf0
authored
May 31, 2022
by
Jacek Caban
Committed by
Alexandre Julliard
Jun 01, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winemac: Avoid PE calls in systray.c.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
parent
1d56578e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
systray.c
dlls/winemac.drv/systray.c
+8
-7
No files found.
dlls/winemac.drv/systray.c
View file @
58e4adf0
...
...
@@ -135,8 +135,8 @@ static BOOL modify_icon(struct tray_icon *icon, NOTIFYICONDATAW *nid)
if
(
nid
->
uFlags
&
NIF_ICON
)
{
if
(
icon
->
image
)
DestroyIcon
(
icon
->
image
);
icon
->
image
=
CopyI
con
(
nid
->
hIcon
);
if
(
icon
->
image
)
NtUserDestroyCursor
(
icon
->
image
,
0
);
icon
->
image
=
CopyI
mage
(
nid
->
hIcon
,
IMAGE_ICON
,
0
,
0
,
0
);
if
(
icon
->
status_item
)
update_image
=
TRUE
;
}
...
...
@@ -195,7 +195,7 @@ static BOOL add_icon(NOTIFYICONDATAW *nid)
return
FALSE
;
}
if
(
!
(
icon
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
icon
))))
if
(
!
(
icon
=
calloc
(
1
,
sizeof
(
*
icon
))))
{
ERR
(
"out of memory
\n
"
);
return
FALSE
;
...
...
@@ -234,8 +234,8 @@ static BOOL delete_icon(struct tray_icon *icon)
macdrv_destroy_status_item
(
icon
->
status_item
);
}
list_remove
(
&
icon
->
entry
);
DestroyIcon
(
icon
->
image
);
HeapFree
(
GetProcessHeap
(),
0
,
icon
);
NtUserDestroyCursor
(
icon
->
image
,
0
);
free
(
icon
);
return
TRUE
;
}
...
...
@@ -290,7 +290,8 @@ static BOOL notify_owner(struct tray_icon *icon, UINT msg, int x, int y)
}
TRACE
(
"posting msg 0x%04x to hwnd %p id 0x%x
\n
"
,
msg
,
icon
->
owner
,
icon
->
id
);
if
(
!
SendNotifyMessageW
(
icon
->
owner
,
icon
->
callback_message
,
wp
,
lp
)
&&
if
(
!
NtUserMessageCall
(
icon
->
owner
,
icon
->
callback_message
,
wp
,
lp
,
0
,
NtUserSendNotifyMessage
,
FALSE
)
&&
(
GetLastError
()
==
ERROR_INVALID_WINDOW_HANDLE
))
{
WARN
(
"window %p was destroyed, removing icon 0x%x
\n
"
,
icon
->
owner
,
icon
->
id
);
...
...
@@ -335,7 +336,7 @@ void macdrv_status_item_mouse_button(const macdrv_event *event)
else
if
(
event
->
status_item_mouse_button
.
count
%
2
==
0
)
msg
+=
WM_LBUTTONDBLCLK
-
WM_LBUTTONDOWN
;
if
(
!
SendMessageW
(
icon
->
owner
,
WM_MACDRV_ACTIVATE_ON_FOLLOWING_FOCUS
,
0
,
0
)
&&
if
(
!
send_message
(
icon
->
owner
,
WM_MACDRV_ACTIVATE_ON_FOLLOWING_FOCUS
,
0
,
0
)
&&
GetLastError
()
==
ERROR_INVALID_WINDOW_HANDLE
)
{
WARN
(
"window %p was destroyed, removing icon 0x%x
\n
"
,
icon
->
owner
,
icon
->
id
);
...
...
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