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
b4e4921c
Commit
b4e4921c
authored
Feb 27, 2024
by
Rémi Bernon
Committed by
Alexandre Julliard
Mar 14, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
win32u: Get rid of the monitor flags.
parent
d77d36b1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
9 deletions
+12
-9
sysparams.c
dlls/win32u/sysparams.c
+12
-9
No files found.
dlls/win32u/sysparams.c
View file @
b4e4921c
...
...
@@ -137,7 +137,6 @@ struct monitor
struct
adapter
*
adapter
;
HANDLE
handle
;
unsigned
int
id
;
unsigned
int
flags
;
unsigned
int
output_id
;
RECT
rc_monitor
;
RECT
rc_work
;
...
...
@@ -157,7 +156,6 @@ BOOL enable_thunk_lock = FALSE;
static
struct
monitor
virtual_monitor
=
{
.
handle
=
VIRTUAL_HMONITOR
,
.
flags
=
MONITORINFOF_PRIMARY
,
.
rc_monitor
.
right
=
1024
,
.
rc_monitor
.
bottom
=
768
,
.
rc_work
.
right
=
1024
,
...
...
@@ -663,15 +661,12 @@ static BOOL read_display_adapter_settings( unsigned int index, struct adapter *i
static
BOOL
read_monitor_settings
(
struct
adapter
*
adapter
,
UINT
index
,
struct
monitor
*
monitor
)
{
char
buffer
[
4096
];
BOOL
is_primary
=
!!
(
adapter
->
state_flags
&
DISPLAY_DEVICE_PRIMARY_DEVICE
);
KEY_VALUE_PARTIAL_INFORMATION
*
value
=
(
void
*
)
buffer
;
WCHAR
*
value_str
=
(
WCHAR
*
)
value
->
Data
;
HKEY
hkey
,
subkey
;
DWORD
size
;
UINT
i
;
monitor
->
flags
=
is_primary
?
MONITORINFOF_PRIMARY
:
0
;
if
(
!
(
hkey
=
reg_open_key
(
config_key
,
adapter
->
config_key
,
lstrlenW
(
adapter
->
config_key
)
*
sizeof
(
WCHAR
)
)))
return
FALSE
;
...
...
@@ -1530,6 +1525,14 @@ static BOOL is_monitor_active( struct monitor *monitor )
return
!
IsRectEmpty
(
&
monitor
->
rc_monitor
);
}
static
BOOL
is_monitor_primary
(
struct
monitor
*
monitor
)
{
struct
adapter
*
adapter
;
/* services do not have any adapters, only a virtual monitor */
if
(
!
(
adapter
=
monitor
->
adapter
))
return
TRUE
;
return
!!
(
adapter
->
state_flags
&
DISPLAY_DEVICE_PRIMARY_DEVICE
);
}
static
void
enum_device_keys
(
const
char
*
root
,
const
WCHAR
*
classW
,
UINT
class_size
,
void
(
*
callback
)(
const
char
*
)
)
{
char
buffer
[
1024
];
...
...
@@ -2304,7 +2307,7 @@ RECT get_primary_monitor_rect( UINT dpi )
LIST_FOR_EACH_ENTRY
(
monitor
,
&
monitors
,
struct
monitor
,
entry
)
{
if
(
!
(
monitor
->
flags
&
MONITORINFOF_PRIMARY
))
continue
;
if
(
!
is_monitor_primary
(
monitor
))
continue
;
rect
=
monitor
->
rc_monitor
;
break
;
}
...
...
@@ -3471,7 +3474,7 @@ BOOL get_monitor_info( HMONITOR handle, MONITORINFO *info )
/* FIXME: map dpi */
info
->
rcMonitor
=
monitor
->
rc_monitor
;
info
->
rcWork
=
monitor
->
rc_work
;
info
->
dwFlags
=
monitor
->
flags
;
info
->
dwFlags
=
is_monitor_primary
(
monitor
)
?
MONITORINFOF_PRIMARY
:
0
;
if
(
info
->
cbSize
>=
sizeof
(
MONITORINFOEXW
))
{
char
buffer
[
CCHDEVICENAME
];
...
...
@@ -3550,7 +3553,7 @@ HMONITOR monitor_from_rect( const RECT *rect, UINT flags, UINT dpi )
}
}
if
(
monitor
->
flags
&
MONITORINFOF_PRIMARY
)
primary
=
monitor
->
handle
;
if
(
is_monitor_primary
(
monitor
)
)
primary
=
monitor
->
handle
;
}
unlock_display_devices
();
...
...
@@ -5120,7 +5123,7 @@ BOOL WINAPI NtUserSystemParametersInfo( UINT action, UINT val, void *ptr, UINT w
LIST_FOR_EACH_ENTRY
(
monitor
,
&
monitors
,
struct
monitor
,
entry
)
{
if
(
!
(
monitor
->
flags
&
MONITORINFOF_PRIMARY
))
continue
;
if
(
!
is_monitor_primary
(
monitor
))
continue
;
work_area
=
monitor
->
rc_work
;
break
;
}
...
...
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