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
01ac2e48
Commit
01ac2e48
authored
Jun 24, 2020
by
Huw Davies
Committed by
Alexandre Julliard
Jun 24, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Allow the app specific desktop to be "Default".
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
afe3e698
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
user_main.c
dlls/user32/user_main.c
+5
-5
No files found.
dlls/user32/user_main.c
View file @
01ac2e48
...
...
@@ -175,12 +175,12 @@ static const WCHAR *get_default_desktop(void)
'A'
,
'p'
,
'p'
,
'D'
,
'e'
,
'f'
,
'a'
,
'u'
,
'l'
,
't'
,
's'
,
0
};
static
WCHAR
buffer
[
MAX_PATH
+
ARRAY_SIZE
(
explorerW
)];
WCHAR
*
p
,
*
appname
=
buffer
;
const
WCHAR
*
ret
=
defaultW
;
const
WCHAR
*
ret
=
NULL
;
DWORD
len
;
HKEY
tmpkey
,
appkey
;
len
=
(
GetModuleFileNameW
(
0
,
buffer
,
MAX_PATH
));
if
(
!
len
||
len
>=
MAX_PATH
)
return
ret
;
if
(
!
len
||
len
>=
MAX_PATH
)
return
defaultW
;
if
((
p
=
strrchrW
(
appname
,
'/'
)))
appname
=
p
+
1
;
if
((
p
=
strrchrW
(
appname
,
'\\'
)))
appname
=
p
+
1
;
p
=
appname
+
strlenW
(
appname
);
...
...
@@ -196,8 +196,7 @@ static const WCHAR *get_default_desktop(void)
len
=
sizeof
(
buffer
);
if
(
!
RegQueryValueExW
(
appkey
,
desktopW
,
0
,
NULL
,
(
LPBYTE
)
buffer
,
&
len
))
ret
=
buffer
;
RegCloseKey
(
appkey
);
if
(
ret
&&
strcmpiW
(
ret
,
defaultW
))
return
ret
;
ret
=
defaultW
;
if
(
ret
)
return
ret
;
}
}
...
...
@@ -210,8 +209,9 @@ static const WCHAR *get_default_desktop(void)
len
=
sizeof
(
buffer
);
if
(
!
RegQueryValueExW
(
appkey
,
desktopW
,
0
,
NULL
,
(
LPBYTE
)
buffer
,
&
len
))
ret
=
buffer
;
RegCloseKey
(
appkey
);
if
(
ret
)
return
ret
;
}
return
ret
;
return
defaultW
;
}
...
...
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