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
6bf64f0a
Commit
6bf64f0a
authored
Jan 28, 2014
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Fail creation of the desktop window earlier on when it already exists.
parent
ef5341b4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
13 deletions
+11
-13
desktop.c
dlls/user32/desktop.c
+2
-0
win.c
dlls/user32/win.c
+3
-0
desktop.c
programs/explorer/desktop.c
+6
-13
No files found.
dlls/user32/desktop.c
View file @
6bf64f0a
...
...
@@ -117,6 +117,8 @@ LRESULT WINAPI DesktopWndProc( HWND hwnd, UINT message, WPARAM wParam, LPARAM lP
ATOM
atom
;
WCHAR
buffer
[
37
];
if
(
GetAncestor
(
hwnd
,
GA_PARENT
))
return
FALSE
;
/* refuse to create non-desktop window */
sprintfW
(
buffer
,
guid_formatW
,
guid
->
Data1
,
guid
->
Data2
,
guid
->
Data3
,
guid
->
Data4
[
0
],
guid
->
Data4
[
1
],
guid
->
Data4
[
2
],
guid
->
Data4
[
3
],
guid
->
Data4
[
4
],
guid
->
Data4
[
5
],
guid
->
Data4
[
6
],
guid
->
Data4
[
7
]
);
...
...
dlls/user32/win.c
View file @
6bf64f0a
...
...
@@ -2086,6 +2086,9 @@ HWND WINAPI GetDesktopWindow(void)
SERVER_END_REQ
;
}
/* wait for the desktop process to be ready */
SendMessageW
(
thread_info
->
top_window
,
WM_NULL
,
0
,
0
);
if
(
!
thread_info
->
top_window
||
!
USER_Driver
->
pCreateDesktopWindow
(
thread_info
->
top_window
))
ERR
(
"failed to create desktop window
\n
"
);
...
...
programs/explorer/desktop.c
View file @
6bf64f0a
...
...
@@ -799,7 +799,7 @@ void manage_desktop( WCHAR *arg )
HDESK
desktop
=
0
;
GUID
guid
;
MSG
msg
;
HWND
hwnd
,
msg_hwnd
;
HWND
hwnd
;
HMODULE
graphics_driver
;
unsigned
int
width
,
height
;
WCHAR
*
cmdline
=
NULL
,
*
driver
=
NULL
;
...
...
@@ -856,12 +856,12 @@ void manage_desktop( WCHAR *arg )
hwnd
=
CreateWindowExW
(
0
,
DESKTOP_CLASS_ATOM
,
NULL
,
WS_POPUP
|
WS_CLIPSIBLINGS
|
WS_CLIPCHILDREN
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
&
guid
);
/* create the HWND_MESSAGE parent */
msg_hwnd
=
CreateWindowExW
(
0
,
messageW
,
NULL
,
WS_POPUP
|
WS_CLIPSIBLINGS
|
WS_CLIPCHILDREN
,
0
,
0
,
100
,
100
,
0
,
0
,
0
,
NULL
);
if
(
hwnd
==
GetDesktopWindow
())
if
(
hwnd
)
{
/* create the HWND_MESSAGE parent */
CreateWindowExW
(
0
,
messageW
,
NULL
,
WS_POPUP
|
WS_CLIPSIBLINGS
|
WS_CLIPCHILDREN
,
0
,
0
,
100
,
100
,
0
,
0
,
0
,
NULL
);
using_root
=
!
desktop
||
!
create_desktop
(
graphics_driver
,
name
,
width
,
height
);
SetWindowLongPtrW
(
hwnd
,
GWLP_WNDPROC
,
(
LONG_PTR
)
desktop_wnd_proc
);
SendMessageW
(
hwnd
,
WM_SETICON
,
ICON_BIG
,
(
LPARAM
)
LoadIconW
(
0
,
MAKEINTRESOURCEW
(
OIC_WINLOGO
)));
...
...
@@ -891,13 +891,6 @@ void manage_desktop( WCHAR *arg )
}
}
}
else
{
DestroyWindow
(
hwnd
);
/* someone beat us to it */
hwnd
=
0
;
}
if
(
GetAncestor
(
msg_hwnd
,
GA_PARENT
))
DestroyWindow
(
msg_hwnd
);
/* someone beat us to it */
/* if we have a command line, execute it */
if
(
cmdline
)
...
...
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