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
a6c7f6a4
Commit
a6c7f6a4
authored
Oct 22, 2013
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
explorer: Store the graphics driver name for the desktop in the registry.
parent
9adff9d0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
8 deletions
+34
-8
desktop.c
programs/explorer/desktop.c
+34
-8
No files found.
programs/explorer/desktop.c
View file @
a6c7f6a4
...
...
@@ -633,24 +633,49 @@ static BOOL get_default_desktop_size( const WCHAR *name, unsigned int *width, un
return
found
;
}
static
void
initialize_display_settings
(
HWND
desktop
)
static
void
set_desktop_guid
(
HWND
desktop
,
HMODULE
driver
)
{
static
const
WCHAR
display_device_guid_propW
[]
=
{
'_'
,
'_'
,
'w'
,
'i'
,
'n'
,
'e'
,
'_'
,
'd'
,
'i'
,
's'
,
'p'
,
'l'
,
'a'
,
'y'
,
'_'
,
'd'
,
'e'
,
'v'
,
'i'
,
'c'
,
'e'
,
'_'
,
'g'
,
'u'
,
'i'
,
'd'
,
0
};
static
const
WCHAR
device_keyW
[]
=
{
'S'
,
'y'
,
's'
,
't'
,
'e'
,
'm'
,
'\\'
,
'C'
,
'u'
,
'r'
,
'r'
,
'e'
,
'n'
,
't'
,
'C'
,
'o'
,
'n'
,
't'
,
'r'
,
'o'
,
'l'
,
'S'
,
'e'
,
't'
,
'\\'
,
'C'
,
'o'
,
'n'
,
't'
,
'r'
,
'o'
,
'l'
,
'\\'
,
'V'
,
'i'
,
'd'
,
'e'
,
'o'
,
'\\'
,
'{'
,
'%'
,
's'
,
'}'
,
'\\'
,
'0'
,
'0'
,
'0'
,
'0'
,
0
};
static
const
WCHAR
driverW
[]
=
{
'G'
,
'r'
,
'a'
,
'p'
,
'h'
,
'i'
,
'c'
,
's'
,
'D'
,
'r'
,
'i'
,
'v'
,
'e'
,
'r'
,
0
};
GUID
guid
;
RPC_
C
STR
guid_str
;
RPC_
W
STR
guid_str
;
ATOM
guid_atom
;
DEVMODEW
dmW
;
HKEY
hkey
;
WCHAR
key
[
sizeof
(
device_keyW
)
/
sizeof
(
WCHAR
)
+
39
];
UuidCreate
(
&
guid
);
UuidToString
A
(
&
guid
,
&
guid_str
);
WINE_TRACE
(
"display guid %s
\n
"
,
guid_str
);
UuidToString
W
(
&
guid
,
&
guid_str
);
TRACE
(
"display guid %s
\n
"
,
debugstr_w
(
guid_str
)
);
guid_atom
=
GlobalAddAtom
A
(
(
LPCSTR
)
guid_str
);
guid_atom
=
GlobalAddAtom
W
(
guid_str
);
SetPropW
(
desktop
,
display_device_guid_propW
,
ULongToHandle
(
guid_atom
)
);
sprintfW
(
key
,
device_keyW
,
guid_str
);
RpcStringFreeW
(
&
guid_str
);
RpcStringFreeA
(
&
guid_str
);
if
(
!
RegCreateKeyExW
(
HKEY_LOCAL_MACHINE
,
key
,
0
,
NULL
,
REG_OPTION_VOLATILE
,
KEY_SET_VALUE
,
NULL
,
&
hkey
,
NULL
))
{
WCHAR
path
[
MAX_PATH
];
GetModuleFileNameW
(
driver
,
path
,
MAX_PATH
);
RegSetValueExW
(
hkey
,
driverW
,
0
,
REG_SZ
,
(
BYTE
*
)
path
,
(
strlenW
(
path
)
+
1
)
*
sizeof
(
WCHAR
)
);
RegCloseKey
(
hkey
);
}
else
ERR
(
"failed to create %s
\n
"
,
debugstr_w
(
key
)
);
}
static
void
initialize_display_settings
(
void
)
{
DEVMODEW
dmW
;
/* Store current display mode in the registry */
if
(
EnumDisplaySettingsExW
(
NULL
,
ENUM_CURRENT_SETTINGS
,
&
dmW
,
0
))
...
...
@@ -760,6 +785,7 @@ void manage_desktop( WCHAR *arg )
ReleaseDC
(
hwnd
,
hdc
);
SetWindowLongPtrW
(
hwnd
,
GWLP_WNDPROC
,
(
LONG_PTR
)
desktop_wnd_proc
);
set_desktop_guid
(
hwnd
,
graphics_driver
);
SendMessageW
(
hwnd
,
WM_SETICON
,
ICON_BIG
,
(
LPARAM
)
LoadIconW
(
0
,
MAKEINTRESOURCEW
(
OIC_WINLOGO
)));
if
(
name
)
set_desktop_window_title
(
hwnd
,
name
);
SetWindowPos
(
hwnd
,
0
,
GetSystemMetrics
(
SM_XVIRTUALSCREEN
),
GetSystemMetrics
(
SM_YVIRTUALSCREEN
),
...
...
@@ -767,7 +793,7 @@ void manage_desktop( WCHAR *arg )
SWP_NOZORDER
|
SWP_NOACTIVATE
|
SWP_SHOWWINDOW
);
SystemParametersInfoW
(
SPI_SETDESKWALLPAPER
,
0
,
NULL
,
FALSE
);
ClipCursor
(
NULL
);
initialize_display_settings
(
hwnd
);
initialize_display_settings
();
initialize_appbar
();
initialize_systray
(
graphics_driver
,
using_root
);
if
(
!
using_root
)
initialize_launchers
(
hwnd
);
...
...
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