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
7255f63a
Commit
7255f63a
authored
Jun 27, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
Jun 28, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
explorer: Set virtual desktop primary adapter display settings.
Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=55146
parent
99ef2dc4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
5 deletions
+19
-5
desktop.c
programs/explorer/desktop.c
+19
-5
No files found.
programs/explorer/desktop.c
View file @
7255f63a
...
...
@@ -937,10 +937,10 @@ static const char *debugstr_devmodew( const DEVMODEW *devmode )
position
);
}
static
void
initialize_display_settings
(
void
)
static
void
initialize_display_settings
(
unsigned
int
width
,
unsigned
int
height
)
{
DISPLAY_DEVICEW
device
=
{.
cb
=
sizeof
(
DISPLAY_DEVICEW
)};
DWORD
i
=
0
;
DWORD
i
=
0
,
flags
=
CDS_GLOBAL
|
CDS_UPDATEREGISTRY
;
/* Store current display mode in the registry */
while
(
EnumDisplayDevicesW
(
NULL
,
i
++
,
&
device
,
0
))
...
...
@@ -955,10 +955,24 @@ static void initialize_display_settings(void)
TRACE
(
"Device %s current display mode %s.
\n
"
,
debugstr_w
(
device
.
DeviceName
),
debugstr_devmodew
(
&
devmode
)
);
if
(
ChangeDisplaySettingsExW
(
device
.
DeviceName
,
&
devmode
,
0
,
CDS_GLOBAL
|
CDS_NORESET
|
CDS_UPDATEREGISTRY
,
0
))
if
(
ChangeDisplaySettingsExW
(
device
.
DeviceName
,
&
devmode
,
0
,
flags
|
CDS_NORESET
,
0
))
ERR
(
"Failed to initialize registry display settings for %s.
\n
"
,
debugstr_w
(
device
.
DeviceName
)
);
}
if
(
!
using_root
)
{
DEVMODEW
devmode
=
{
.
dmSize
=
sizeof
(
DEVMODEW
),
.
dmFields
=
DM_PELSWIDTH
|
DM_PELSHEIGHT
,
.
dmPelsWidth
=
width
,
.
dmPelsHeight
=
height
,
};
/* in virtual desktop mode, set the primary display settings to match desktop size */
if
(
ChangeDisplaySettingsExW
(
NULL
,
&
devmode
,
0
,
flags
,
NULL
))
ERR
(
"Failed to set primary display settings.
\n
"
);
}
}
static
void
set_desktop_window_title
(
HWND
hwnd
,
const
WCHAR
*
name
)
...
...
@@ -1085,7 +1099,7 @@ void manage_desktop( WCHAR *arg )
if
(
thread
)
CloseHandle
(
thread
);
SystemParametersInfoW
(
SPI_SETDESKWALLPAPER
,
0
,
NULL
,
FALSE
);
ClipCursor
(
NULL
);
initialize_display_settings
();
initialize_display_settings
(
width
,
height
);
initialize_appbar
();
if
(
using_root
)
enable_shell
=
FALSE
;
...
...
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