Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
9b766959
Commit
9b766959
authored
Jun 20, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
Jun 21, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
win32u: Move virtual desktop display settings logic from winex11.
parent
08fd8ad0
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
253 additions
and
49 deletions
+253
-49
sysparams.c
dlls/win32u/sysparams.c
+241
-12
win32u_private.h
dlls/win32u/win32u_private.h
+1
-0
winstation.c
dlls/win32u/winstation.c
+2
-0
desktop.c
dlls/winex11.drv/desktop.c
+0
-0
display.c
dlls/winex11.drv/display.c
+9
-36
x11drv.h
dlls/winex11.drv/x11drv.h
+0
-1
No files found.
dlls/win32u/sysparams.c
View file @
9b766959
This diff is collapsed.
Click to expand it.
dlls/win32u/win32u_private.h
View file @
9b766959
...
...
@@ -182,6 +182,7 @@ extern RECT rect_thread_to_win_dpi( HWND hwnd, RECT rect ) DECLSPEC_HIDDEN;
extern
HMONITOR
monitor_from_point
(
POINT
pt
,
UINT
flags
,
UINT
dpi
)
DECLSPEC_HIDDEN
;
extern
HMONITOR
monitor_from_rect
(
const
RECT
*
rect
,
UINT
flags
,
UINT
dpi
)
DECLSPEC_HIDDEN
;
extern
HMONITOR
monitor_from_window
(
HWND
hwnd
,
UINT
flags
,
UINT
dpi
)
DECLSPEC_HIDDEN
;
extern
BOOL
update_display_cache
(
BOOL
force
)
DECLSPEC_HIDDEN
;
extern
void
user_lock
(
void
)
DECLSPEC_HIDDEN
;
extern
void
user_unlock
(
void
)
DECLSPEC_HIDDEN
;
extern
void
user_check_not_lock
(
void
)
DECLSPEC_HIDDEN
;
...
...
dlls/win32u/winstation.c
View file @
9b766959
...
...
@@ -183,6 +183,8 @@ HDESK WINAPI NtUserCreateDesktopEx( OBJECT_ATTRIBUTES *attr, UNICODE_STRING *dev
return
0
;
}
/* force update display cache to use virtual desktop display settings */
if
(
flags
&
DF_WINE_CREATE_DESKTOP
)
update_display_cache
(
TRUE
);
return
ret
;
}
...
...
dlls/winex11.drv/desktop.c
View file @
9b766959
This diff is collapsed.
Click to expand it.
dlls/winex11.drv/display.c
View file @
9b766959
...
...
@@ -29,7 +29,6 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
x11drv
);
static
struct
x11drv_display_device_handler
host_handler
;
struct
x11drv_display_device_handler
desktop_handler
;
static
struct
x11drv_settings_handler
settings_handler
;
#define NEXT_DEVMODEW(mode) ((DEVMODEW *)((char *)((mode) + 1) + (mode)->dmDriverExtra))
...
...
@@ -414,21 +413,6 @@ RECT get_host_primary_monitor_rect(void)
return
rect
;
}
BOOL
get_host_primary_gpu
(
struct
gdi_gpu
*
gpu
)
{
struct
gdi_gpu
*
gpus
;
INT
gpu_count
;
if
(
host_handler
.
get_gpus
(
&
gpus
,
&
gpu_count
)
&&
gpu_count
)
{
*
gpu
=
gpus
[
0
];
host_handler
.
free_gpus
(
gpus
);
return
TRUE
;
}
return
FALSE
;
}
RECT
get_work_area
(
const
RECT
*
monitor_rect
)
{
Atom
type
;
...
...
@@ -499,10 +483,7 @@ void X11DRV_DisplayDevices_SetHandler(const struct x11drv_display_device_handler
void
X11DRV_DisplayDevices_RegisterEventHandlers
(
void
)
{
struct
x11drv_display_device_handler
*
handler
=
is_virtual_desktop
()
?
&
desktop_handler
:
&
host_handler
;
if
(
handler
->
register_event_handlers
)
handler
->
register_event_handlers
();
if
(
host_handler
.
register_event_handlers
)
host_handler
.
register_event_handlers
();
}
/* Report whether a display device handler supports detecting dynamic device changes */
...
...
@@ -534,7 +515,6 @@ static const char *debugstr_devmodew( const DEVMODEW *devmode )
BOOL
X11DRV_UpdateDisplayDevices
(
const
struct
gdi_device_manager
*
device_manager
,
BOOL
force
,
void
*
param
)
{
struct
x11drv_display_device_handler
*
handler
;
struct
gdi_adapter
*
adapters
;
struct
gdi_monitor
*
monitors
;
struct
gdi_gpu
*
gpus
;
...
...
@@ -542,17 +522,14 @@ BOOL X11DRV_UpdateDisplayDevices( const struct gdi_device_manager *device_manage
INT
gpu
,
adapter
,
monitor
;
DEVMODEW
*
modes
,
*
mode
;
UINT
mode_count
;
BOOL
virtual_desktop
;
if
(
!
force
&&
!
force_display_devices_refresh
)
return
TRUE
;
force_display_devices_refresh
=
FALSE
;
virtual_desktop
=
is_virtual_desktop
();
handler
=
virtual_desktop
?
&
desktop_handler
:
&
host_handler
;
TRACE
(
"via %s
\n
"
,
wine_dbgstr_a
(
handler
->
name
)
);
TRACE
(
"via %s
\n
"
,
debugstr_a
(
host_handler
.
name
)
);
/* Initialize GPUs */
if
(
!
h
andler
->
get_gpus
(
&
gpus
,
&
gpu_count
))
return
FALSE
;
if
(
!
h
ost_handler
.
get_gpus
(
&
gpus
,
&
gpu_count
))
return
FALSE
;
TRACE
(
"GPU count: %d
\n
"
,
gpu_count
);
for
(
gpu
=
0
;
gpu
<
gpu_count
;
gpu
++
)
...
...
@@ -560,7 +537,7 @@ BOOL X11DRV_UpdateDisplayDevices( const struct gdi_device_manager *device_manage
device_manager
->
add_gpu
(
&
gpus
[
gpu
],
param
);
/* Initialize adapters */
if
(
!
h
andler
->
get_adapters
(
gpus
[
gpu
].
id
,
&
adapters
,
&
adapter_count
))
break
;
if
(
!
h
ost_handler
.
get_adapters
(
gpus
[
gpu
].
id
,
&
adapters
,
&
adapter_count
))
break
;
TRACE
(
"GPU: %#lx %s, adapter count: %d
\n
"
,
gpus
[
gpu
].
id
,
wine_dbgstr_w
(
gpus
[
gpu
].
name
),
adapter_count
);
for
(
adapter
=
0
;
adapter
<
adapter_count
;
adapter
++
)
...
...
@@ -573,25 +550,21 @@ BOOL X11DRV_UpdateDisplayDevices( const struct gdi_device_manager *device_manage
device_manager
->
add_adapter
(
&
adapters
[
adapter
],
param
);
if
(
!
h
andler
->
get_monitors
(
adapters
[
adapter
].
id
,
&
monitors
,
&
monitor_count
))
break
;
if
(
!
h
ost_handler
.
get_monitors
(
adapters
[
adapter
].
id
,
&
monitors
,
&
monitor_count
))
break
;
TRACE
(
"adapter: %#lx, monitor count: %d
\n
"
,
adapters
[
adapter
].
id
,
monitor_count
);
/* Initialize monitors */
for
(
monitor
=
0
;
monitor
<
monitor_count
;
monitor
++
)
device_manager
->
add_monitor
(
&
monitors
[
monitor
],
param
);
h
andler
->
free_monitors
(
monitors
,
monitor_count
);
h
ost_handler
.
free_monitors
(
monitors
,
monitor_count
);
/* Get the settings handler id for the adapter */
snprintf
(
buffer
,
sizeof
(
buffer
),
"
\\\\
.
\\
DISPLAY%d"
,
adapter
+
1
);
asciiz_to_unicode
(
devname
,
buffer
);
if
(
!
settings_handler
.
get_id
(
devname
,
is_primary
,
&
settings_id
))
break
;
/* We don't need to set the win32u current mode when we are in
* virtual desktop mode, and, additionally, skipping this avoids a
* deadlock, since the desktop get_current_mode() implementation
* recurses into win32u. */
if
(
!
virtual_desktop
)
settings_handler
.
get_current_mode
(
settings_id
,
&
current_mode
);
settings_handler
.
get_current_mode
(
settings_id
,
&
current_mode
);
if
(
!
settings_handler
.
get_modes
(
settings_id
,
EDS_ROTATEDMODE
,
&
modes
,
&
mode_count
))
continue
;
...
...
@@ -613,10 +586,10 @@ BOOL X11DRV_UpdateDisplayDevices( const struct gdi_device_manager *device_manage
settings_handler
.
free_modes
(
modes
);
}
h
andler
->
free_adapters
(
adapters
);
h
ost_handler
.
free_adapters
(
adapters
);
}
h
andler
->
free_gpus
(
gpus
);
h
ost_handler
.
free_gpus
(
gpus
);
return
TRUE
;
}
...
...
dlls/winex11.drv/x11drv.h
View file @
9b766959
...
...
@@ -805,7 +805,6 @@ struct x11drv_display_device_handler
void
(
*
register_event_handlers
)(
void
);
};
extern
BOOL
get_host_primary_gpu
(
struct
gdi_gpu
*
gpu
)
DECLSPEC_HIDDEN
;
extern
void
X11DRV_DisplayDevices_SetHandler
(
const
struct
x11drv_display_device_handler
*
handler
)
DECLSPEC_HIDDEN
;
extern
void
X11DRV_DisplayDevices_Init
(
BOOL
force
)
DECLSPEC_HIDDEN
;
extern
void
X11DRV_DisplayDevices_RegisterEventHandlers
(
void
)
DECLSPEC_HIDDEN
;
...
...
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