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
ed3ed035
Commit
ed3ed035
authored
Jan 16, 2014
by
Ken Thomases
Committed by
Alexandre Julliard
Jan 17, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winemac: Ignore failure to send or 0 result from WM_QUERYENDSESSION if target window was destroyed.
parent
841aabfd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
3 deletions
+15
-3
window.c
dlls/winemac.drv/window.c
+15
-3
No files found.
dlls/winemac.drv/window.c
View file @
ed3ed035
...
...
@@ -2260,6 +2260,12 @@ static void CALLBACK quit_callback(HWND hwnd, UINT msg, ULONG_PTR data, LRESULT
TRACE
(
"got WM_QUERYENDSESSION result %ld from win %p (%u of %u done)
\n
"
,
result
,
hwnd
,
qi
->
done
,
qi
->
count
);
if
(
!
result
&&
!
IsWindow
(
hwnd
))
{
TRACE
(
"win %p no longer exists; ignoring apparent refusal
\n
"
,
hwnd
);
result
=
TRUE
;
}
if
(
!
result
&&
qi
->
result
)
{
qi
->
result
=
FALSE
;
...
...
@@ -2360,9 +2366,15 @@ void macdrv_app_quit_requested(const macdrv_event *event)
if
(
!
SendMessageCallbackW
(
qi
->
wins
[
i
],
WM_QUERYENDSESSION
,
0
,
qi
->
flags
,
quit_callback
,
(
ULONG_PTR
)
qi
))
{
WARN
(
"failed to send WM_QUERYENDSESSION to win %p; error 0x%08x; assuming refusal
\n
"
,
qi
->
wins
[
i
],
GetLastError
());
quit_callback
(
qi
->
wins
[
i
],
WM_QUERYENDSESSION
,
(
ULONG_PTR
)
qi
,
FALSE
);
DWORD
error
=
GetLastError
();
BOOL
invalid
=
(
error
==
ERROR_INVALID_WINDOW_HANDLE
);
if
(
invalid
)
TRACE
(
"failed to send WM_QUERYENDSESSION to win %p because it's invalid; assuming success
\n
"
,
qi
->
wins
[
i
]);
else
WARN
(
"failed to send WM_QUERYENDSESSION to win %p; error 0x%08x; assuming refusal
\n
"
,
qi
->
wins
[
i
],
error
);
quit_callback
(
qi
->
wins
[
i
],
WM_QUERYENDSESSION
,
(
ULONG_PTR
)
qi
,
invalid
);
}
}
...
...
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