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
1a4f6e57
Commit
1a4f6e57
authored
Mar 07, 2006
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user: Launch explorer to manage the desktop window.
parent
a93b6a59
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
48 additions
and
7 deletions
+48
-7
win.c
dlls/user/win.c
+43
-3
winpos.c
dlls/x11drv/winpos.c
+0
-2
server_protocol.h
include/wine/server_protocol.h
+2
-1
protocol.def
server/protocol.def
+1
-0
trace.c
server/trace.c
+1
-0
window.c
server/window.c
+1
-1
No files found.
dlls/user/win.c
View file @
1a4f6e57
...
...
@@ -103,6 +103,16 @@ static WND *create_window_handle( HWND parent, HWND owner, ATOM atom,
return
NULL
;
}
if
(
!
parent
)
/* if parent is 0 we don't have a desktop window yet */
{
struct
user_thread_info
*
thread_info
=
get_user_thread_info
();
assert
(
!
thread_info
->
desktop
);
thread_info
->
desktop
=
full_parent
?
full_parent
:
handle
;
if
(
full_parent
&&
!
USER_Driver
->
pCreateDesktopWindow
(
thread_info
->
desktop
))
ERR
(
"failed to create desktop window
\n
"
);
}
USER_Lock
();
index
=
USER_HANDLE_TO_INDEX
(
handle
);
...
...
@@ -946,7 +956,8 @@ static HWND WIN_CreateWindowEx( CREATESTRUCTA *cs, ATOM classAtom,
WARN
(
"No parent for child window
\n
"
);
return
0
;
/* WS_CHILD needs a parent, but WS_POPUP doesn't */
}
parent
=
GetDesktopWindow
();
if
(
classAtom
!=
LOWORD
(
DESKTOP_CLASS_ATOM
))
/* are we creating the desktop itself? */
parent
=
GetDesktopWindow
();
}
WIN_FixCoordinates
(
cs
,
&
sw
);
/* fix default coordinates */
...
...
@@ -1553,16 +1564,45 @@ HWND WINAPI GetDesktopWindow(void)
{
struct
user_thread_info
*
thread_info
=
get_user_thread_info
();
if
(
thread_info
->
desktop
)
return
thread_info
->
desktop
;
SERVER_START_REQ
(
get_desktop_window
)
{
req
->
force
=
0
;
if
(
!
wine_server_call
(
req
))
thread_info
->
desktop
=
reply
->
handle
;
}
SERVER_END_REQ
;
if
(
!
thread_info
->
desktop
)
{
STARTUPINFOW
si
;
PROCESS_INFORMATION
pi
;
WCHAR
command_line
[]
=
{
'e'
,
'x'
,
'p'
,
'l'
,
'o'
,
'r'
,
'e'
,
'r'
,
'.'
,
'e'
,
'x'
,
'e'
,
' '
,
'/'
,
'd'
,
'e'
,
's'
,
'k'
,
't'
,
'o'
,
'p'
,
0
};
memset
(
&
si
,
0
,
sizeof
(
si
)
);
si
.
cb
=
sizeof
(
si
);
if
(
CreateProcessW
(
NULL
,
command_line
,
NULL
,
NULL
,
FALSE
,
DETACHED_PROCESS
,
NULL
,
NULL
,
&
si
,
&
pi
))
{
TRACE
(
"started explorer pid %04lx tid %04lx
\n
"
,
pi
.
dwProcessId
,
pi
.
dwThreadId
);
WaitForInputIdle
(
pi
.
hProcess
,
10000
);
CloseHandle
(
pi
.
hThread
);
CloseHandle
(
pi
.
hProcess
);
}
else
WARN
(
"failed to start explorer, err %ld
\n
"
,
GetLastError
()
);
SERVER_START_REQ
(
get_desktop_window
)
{
req
->
force
=
1
;
if
(
!
wine_server_call
(
req
))
thread_info
->
desktop
=
reply
->
handle
;
}
SERVER_END_REQ
;
if
(
!
thread_info
->
desktop
||
!
USER_Driver
->
pCreateDesktopWindow
(
thread_info
->
desktop
))
ERR
(
"failed to create desktop window
\n
"
);
}
if
(
!
thread_info
->
desktop
||
!
USER_Driver
->
pCreateDesktopWindow
(
thread_info
->
desktop
))
ERR
(
"failed to create desktop window
\n
"
);
return
thread_info
->
desktop
;
}
...
...
dlls/x11drv/winpos.c
View file @
1a4f6e57
...
...
@@ -942,8 +942,6 @@ BOOL X11DRV_ShowWindow( HWND hwnd, INT cmd )
RECT
newPos
=
{
0
,
0
,
0
,
0
};
UINT
swp
=
0
;
if
(
hwnd
==
GetDesktopWindow
())
return
FALSE
;
TRACE
(
"hwnd=%p, cmd=%d, wasVisible %d
\n
"
,
hwnd
,
cmd
,
wasVisible
);
switch
(
cmd
)
...
...
include/wine/server_protocol.h
View file @
1a4f6e57
...
...
@@ -2543,6 +2543,7 @@ struct destroy_window_reply
struct
get_desktop_window_request
{
struct
request_header
__header
;
int
force
;
};
struct
get_desktop_window_reply
{
...
...
@@ -4360,6 +4361,6 @@ union generic_reply
struct
query_symlink_reply
query_symlink_reply
;
};
#define SERVER_PROTOCOL_VERSION 23
0
#define SERVER_PROTOCOL_VERSION 23
1
#endif
/* __WINE_WINE_SERVER_PROTOCOL_H */
server/protocol.def
View file @
1a4f6e57
...
...
@@ -1804,6 +1804,7 @@ enum message_type
/* Retrieve the desktop window for the current thread */
@REQ(get_desktop_window)
int force; /* force creation if it doesn't exist */
@REPLY
user_handle_t handle; /* handle to the desktop window */
@END
...
...
server/trace.c
View file @
1a4f6e57
...
...
@@ -2280,6 +2280,7 @@ static void dump_destroy_window_request( const struct destroy_window_request *re
static
void
dump_get_desktop_window_request
(
const
struct
get_desktop_window_request
*
req
)
{
fprintf
(
stderr
,
" force=%d"
,
req
->
force
);
}
static
void
dump_get_desktop_window_reply
(
const
struct
get_desktop_window_reply
*
req
)
...
...
server/window.c
View file @
1a4f6e57
...
...
@@ -1459,7 +1459,7 @@ DECL_HANDLER(destroy_window)
/* retrieve the desktop window for the current thread */
DECL_HANDLER
(
get_desktop_window
)
{
struct
window
*
win
=
get_desktop_window
(
current
,
1
);
struct
window
*
win
=
get_desktop_window
(
current
,
req
->
force
);
if
(
win
)
reply
->
handle
=
win
->
handle
;
}
...
...
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