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
4f30ff87
Commit
4f30ff87
authored
May 18, 2010
by
Vincent Povirk
Committed by
Alexandre Julliard
Jul 23, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wineboot: Query windows from all desktops when --end-session --kill is used.
parent
1b37809d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
45 additions
and
1 deletion
+45
-1
shutdown.c
programs/wineboot/shutdown.c
+39
-0
wineboot.c
programs/wineboot/wineboot.c
+6
-1
No files found.
programs/wineboot/shutdown.c
View file @
4f30ff87
...
...
@@ -322,6 +322,45 @@ BOOL shutdown_close_windows( BOOL force )
return
(
result
!=
0
);
}
static
BOOL
CALLBACK
shutdown_one_desktop
(
LPWSTR
name
,
LPARAM
force
)
{
HDESK
hdesk
;
WINE_TRACE
(
"Shutting down desktop %s
\n
"
,
wine_dbgstr_w
(
name
));
hdesk
=
OpenDesktopW
(
name
,
0
,
FALSE
,
GENERIC_ALL
);
if
(
hdesk
==
NULL
)
{
WINE_ERR
(
"Cannot open desktop %s, err=%i
\n
"
,
wine_dbgstr_w
(
name
),
GetLastError
());
return
0
;
}
if
(
!
SetThreadDesktop
(
hdesk
))
{
CloseDesktop
(
hdesk
);
WINE_ERR
(
"Cannot set thread desktop %s, err=%i
\n
"
,
wine_dbgstr_w
(
name
),
GetLastError
());
return
0
;
}
CloseDesktop
(
hdesk
);
return
shutdown_close_windows
(
force
);
}
BOOL
shutdown_all_desktops
(
BOOL
force
)
{
BOOL
ret
;
HDESK
prev_desktop
;
prev_desktop
=
GetThreadDesktop
(
GetCurrentThreadId
());
ret
=
EnumDesktopsW
(
NULL
,
shutdown_one_desktop
,
(
LPARAM
)
force
);
SetThreadDesktop
(
prev_desktop
);
return
ret
;
}
/* forcibly kill all processes without any cleanup */
void
kill_processes
(
BOOL
kill_desktop
)
{
...
...
programs/wineboot/wineboot.c
View file @
4f30ff87
...
...
@@ -88,6 +88,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(wineboot);
#define MAX_LINE_LENGTH (2*MAX_PATH+2)
extern
BOOL
shutdown_close_windows
(
BOOL
force
);
extern
BOOL
shutdown_all_desktops
(
BOOL
force
);
extern
void
kill_processes
(
BOOL
kill_desktop
);
static
WCHAR
windowsdir
[
MAX_PATH
];
...
...
@@ -1142,7 +1143,11 @@ int main( int argc, char *argv[] )
if
(
end_session
)
{
if
(
!
shutdown_close_windows
(
force
))
return
1
;
if
(
kill
)
{
if
(
!
shutdown_all_desktops
(
force
))
return
1
;
}
else
if
(
!
shutdown_close_windows
(
force
))
return
1
;
}
if
(
kill
)
kill_processes
(
shutdown
);
...
...
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