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
f7d45533
Commit
f7d45533
authored
May 29, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
May 30, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
explorer: Call user driver through a new CreateDesktop callback.
parent
0edc848b
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
32 additions
and
4 deletions
+32
-4
winstation.c
dlls/user32/winstation.c
+1
-1
driver.c
dlls/win32u/driver.c
+12
-0
winstation.c
dlls/win32u/winstation.c
+11
-1
ntuser.h
include/ntuser.h
+3
-0
gdi_driver.h
include/wine/gdi_driver.h
+1
-0
desktop.c
programs/explorer/desktop.c
+4
-2
No files found.
dlls/user32/winstation.c
View file @
f7d45533
...
...
@@ -256,7 +256,7 @@ HDESK WINAPI CreateDesktopW( LPCWSTR name, LPCWSTR device, LPDEVMODEW devmode,
OBJECT_ATTRIBUTES
attr
;
UNICODE_STRING
str
;
if
(
device
||
devmode
)
if
(
device
||
(
devmode
&&
!
(
flags
&
DF_WINE_CREATE_DESKTOP
))
)
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
0
;
...
...
dlls/win32u/driver.c
View file @
f7d45533
...
...
@@ -783,6 +783,11 @@ static BOOL nulldrv_UpdateDisplayDevices( const struct gdi_device_manager *manag
return
FALSE
;
}
static
BOOL
nulldrv_CreateDesktop
(
const
WCHAR
*
name
,
UINT
width
,
UINT
height
)
{
return
TRUE
;
}
static
BOOL
nodrv_CreateWindow
(
HWND
hwnd
)
{
static
int
warned
;
...
...
@@ -1149,6 +1154,11 @@ static BOOL loaderdrv_UpdateDisplayDevices( const struct gdi_device_manager *man
return
load_driver
()
->
pUpdateDisplayDevices
(
manager
,
force
,
param
);
}
static
BOOL
loaderdrv_CreateDesktop
(
const
WCHAR
*
name
,
UINT
width
,
UINT
height
)
{
return
load_driver
()
->
pCreateDesktop
(
name
,
width
,
height
);
}
static
BOOL
loaderdrv_CreateWindow
(
HWND
hwnd
)
{
return
load_driver
()
->
pCreateWindow
(
hwnd
);
...
...
@@ -1222,6 +1232,7 @@ static const struct user_driver_funcs lazy_load_driver =
loaderdrv_GetDisplayDepth
,
loaderdrv_UpdateDisplayDevices
,
/* windowing functions */
loaderdrv_CreateDesktop
,
loaderdrv_CreateWindow
,
nulldrv_DesktopWindowProc
,
nulldrv_DestroyWindow
,
...
...
@@ -1300,6 +1311,7 @@ void __wine_set_user_driver( const struct user_driver_funcs *funcs, UINT version
SET_USER_FUNC
(
GetCurrentDisplaySettings
);
SET_USER_FUNC
(
GetDisplayDepth
);
SET_USER_FUNC
(
UpdateDisplayDevices
);
SET_USER_FUNC
(
CreateDesktop
);
SET_USER_FUNC
(
CreateWindow
);
SET_USER_FUNC
(
DesktopWindowProc
);
SET_USER_FUNC
(
DestroyWindow
);
...
...
dlls/win32u/winstation.c
View file @
f7d45533
...
...
@@ -141,9 +141,10 @@ HDESK WINAPI NtUserCreateDesktopEx( OBJECT_ATTRIBUTES *attr, UNICODE_STRING *dev
DEVMODEW
*
devmode
,
DWORD
flags
,
ACCESS_MASK
access
,
ULONG
heap_size
)
{
WCHAR
buffer
[
MAX_PATH
];
HANDLE
ret
;
if
((
device
&&
device
->
Length
)
||
devmode
)
if
((
device
&&
device
->
Length
)
||
(
devmode
&&
!
(
flags
&
DF_WINE_CREATE_DESKTOP
))
)
{
RtlSetLastWin32Error
(
ERROR_INVALID_PARAMETER
);
return
0
;
...
...
@@ -163,6 +164,15 @@ HDESK WINAPI NtUserCreateDesktopEx( OBJECT_ATTRIBUTES *attr, UNICODE_STRING *dev
ret
=
wine_server_ptr_handle
(
reply
->
handle
);
}
SERVER_END_REQ
;
if
(
!
devmode
)
return
ret
;
lstrcpynW
(
buffer
,
attr
->
ObjectName
->
Buffer
,
attr
->
ObjectName
->
Length
/
sizeof
(
WCHAR
)
+
1
);
if
(
!
user_driver
->
pCreateDesktop
(
buffer
,
devmode
->
dmPelsWidth
,
devmode
->
dmPelsHeight
))
{
NtUserCloseDesktop
(
ret
);
return
0
;
}
return
ret
;
}
...
...
include/ntuser.h
View file @
f7d45533
...
...
@@ -286,6 +286,9 @@ struct unpack_dde_message_params
#define SPY_RESULT_OK 0x0001
#define SPY_RESULT_DEFWND 0x0002
/* CreateDesktop wine specific flag */
#define DF_WINE_CREATE_DESKTOP 0x80000000
/* NtUserMessageCall codes */
enum
{
...
...
include/wine/gdi_driver.h
View file @
f7d45533
...
...
@@ -307,6 +307,7 @@ struct user_driver_funcs
INT
(
*
pGetDisplayDepth
)(
LPCWSTR
,
BOOL
);
BOOL
(
*
pUpdateDisplayDevices
)(
const
struct
gdi_device_manager
*
,
BOOL
,
void
*
);
/* windowing functions */
BOOL
(
*
pCreateDesktop
)(
const
WCHAR
*
,
UINT
,
UINT
);
BOOL
(
*
pCreateWindow
)(
HWND
);
LRESULT
(
*
pDesktopWindowProc
)(
HWND
,
UINT
,
WPARAM
,
LPARAM
);
void
(
*
pDestroyWindow
)(
HWND
);
...
...
programs/explorer/desktop.c
View file @
f7d45533
...
...
@@ -1089,9 +1089,11 @@ void manage_desktop( WCHAR *arg )
if
(
name
&&
width
&&
height
)
{
DEVMODEW
devmode
=
{.
dmPelsWidth
=
width
,
.
dmPelsHeight
=
height
};
/* magic: desktop "root" means use the root window */
using_root
=
!
wcsicmp
(
name
,
L"root"
);
if
(
!
(
desktop
=
CreateDesktopW
(
name
,
NULL
,
NULL
,
0
,
DESKTOP_ALL_ACCESS
,
NULL
)))
if
((
using_root
=
!
wcsicmp
(
name
,
L"root"
)))
desktop
=
CreateDesktopW
(
name
,
NULL
,
NULL
,
0
,
DESKTOP_ALL_ACCESS
,
NULL
);
else
desktop
=
CreateDesktopW
(
name
,
NULL
,
&
devmode
,
DF_WINE_CREATE_DESKTOP
,
DESKTOP_ALL_ACCESS
,
NULL
);
if
(
!
desktop
)
{
WINE_ERR
(
"failed to create desktop %s error %ld
\n
"
,
wine_dbgstr_w
(
name
),
GetLastError
()
);
ExitProcess
(
1
);
...
...
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