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
efda9908
Commit
efda9908
authored
Nov 16, 2007
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Nov 19, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11.drv: Use display device guid managed by explorer.
parent
be32b341
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
55 additions
and
6 deletions
+55
-6
settings.c
dlls/winex11.drv/settings.c
+34
-5
Makefile.in
programs/explorer/Makefile.in
+1
-1
desktop.c
programs/explorer/desktop.c
+20
-0
No files found.
dlls/winex11.drv/settings.c
View file @
efda9908
...
...
@@ -21,6 +21,7 @@
#include "config.h"
#include <string.h>
#include <stdio.h>
#include <assert.h>
#define NONAMELESSUNION
#define NONAMELESSSTRUCT
...
...
@@ -166,17 +167,40 @@ void X11DRV_Settings_Init(void)
X11DRV_Settings_AddOneMode
(
screen_width
,
screen_height
,
0
,
60
);
}
/* Our fake driver GUID path */
static
const
char
wine_X11_reg_key
[]
=
"System
\\
CurrentControlSet
\\
Control
\\
Video
\\
{64498428-1122-3344-5566-778899aabbcc}
\\
0000"
;
static
BOOL
get_display_device_reg_key
(
char
*
key
,
unsigned
len
)
{
static
const
char
display_device_guid_prop
[]
=
"__wine_display_device_guid"
;
static
const
char
video_path
[]
=
"System
\\
CurrentControlSet
\\
Control
\\
Video
\\
{"
;
static
const
char
display0
[]
=
"}
\\
0000"
;
ATOM
guid_atom
;
assert
(
len
>=
sizeof
(
video_path
)
+
sizeof
(
display0
)
+
40
);
guid_atom
=
HandleToULong
(
GetPropA
(
GetDesktopWindow
(),
display_device_guid_prop
));
if
(
!
guid_atom
)
return
FALSE
;
memcpy
(
key
,
video_path
,
sizeof
(
video_path
));
if
(
!
GlobalGetAtomNameA
(
guid_atom
,
key
+
strlen
(
key
),
40
))
return
FALSE
;
strcat
(
key
,
display0
);
TRACE
(
"display device key %s
\n
"
,
wine_dbgstr_a
(
key
));
return
TRUE
;
}
static
BOOL
read_registry_settings
(
DEVMODEW
*
dm
)
{
char
wine_x11_reg_key
[
128
];
HKEY
hkey
;
DWORD
type
,
size
;
BOOL
ret
=
TRUE
;
if
(
RegOpenKeyA
(
HKEY_CURRENT_CONFIG
,
wine_X11_reg_key
,
&
hkey
))
if
(
!
get_display_device_reg_key
(
wine_x11_reg_key
,
sizeof
(
wine_x11_reg_key
)))
return
FALSE
;
if
(
RegOpenKeyExA
(
HKEY_CURRENT_CONFIG
,
wine_x11_reg_key
,
0
,
KEY_READ
,
&
hkey
))
return
FALSE
;
#define query_value(name, data) \
...
...
@@ -203,10 +227,15 @@ static BOOL read_registry_settings(DEVMODEW *dm)
static
BOOL
write_registry_settings
(
const
DEVMODEW
*
dm
)
{
char
wine_x11_reg_key
[
128
];
HKEY
hkey
;
BOOL
ret
=
TRUE
;
if
(
RegCreateKeyA
(
HKEY_CURRENT_CONFIG
,
wine_X11_reg_key
,
&
hkey
))
if
(
!
get_display_device_reg_key
(
wine_x11_reg_key
,
sizeof
(
wine_x11_reg_key
)))
return
FALSE
;
if
(
RegCreateKeyExA
(
HKEY_CURRENT_CONFIG
,
wine_x11_reg_key
,
0
,
NULL
,
REG_OPTION_VOLATILE
,
KEY_WRITE
,
NULL
,
&
hkey
,
NULL
))
return
FALSE
;
#define set_value(name, data) \
...
...
programs/explorer/Makefile.in
View file @
efda9908
...
...
@@ -4,7 +4,7 @@ SRCDIR = @srcdir@
VPATH
=
@srcdir@
MODULE
=
explorer.exe
APPMODE
=
-mwindows
IMPORTS
=
user32 gdi32 advapi32 kernel32 ntdll
IMPORTS
=
rpcrt4 user32 gdi32 advapi32 kernel32 ntdll
DELAYIMPORTS
=
comctl32
EXTRADEFS
=
@HALINCL@
EXTRALIBS
=
@DISKARBITRATIONLIB@
...
...
programs/explorer/desktop.c
View file @
efda9908
...
...
@@ -115,6 +115,25 @@ static BOOL get_default_desktop_size( unsigned int *width, unsigned int *height
return
ret
;
}
static
void
initialize_display_settings
(
HWND
desktop
)
{
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
};
GUID
guid
;
LPWSTR
guid_str
;
ATOM
guid_atom
;
UuidCreate
(
&
guid
);
UuidToStringW
(
&
guid
,
&
guid_str
);
WINE_TRACE
(
"display guid %s
\n
"
,
wine_dbgstr_w
(
guid_str
)
);
guid_atom
=
GlobalAddAtomW
(
guid_str
);
SetPropW
(
desktop
,
display_device_guid_propW
,
ULongToHandle
(
guid_atom
)
);
RpcStringFreeW
(
&
guid_str
);
}
/* main desktop management function */
void
manage_desktop
(
char
*
arg
)
{
...
...
@@ -171,6 +190,7 @@ void manage_desktop( char *arg )
SetWindowTextW
(
hwnd
,
desktop_nameW
);
SystemParametersInfoA
(
SPI_SETDESKPATTERN
,
-
1
,
NULL
,
FALSE
);
SetDeskWallPaper
(
(
LPSTR
)
-
1
);
initialize_display_settings
(
hwnd
);
initialize_diskarbitration
();
initialize_hal
();
initialize_systray
();
...
...
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