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
4fcbbf8c
Commit
4fcbbf8c
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
winex11: Use the user driver interface to create host desktops.
parent
e0d3683d
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
34 additions
and
44 deletions
+34
-44
desktop.c
dlls/winex11.drv/desktop.c
+7
-15
dllmain.c
dlls/winex11.drv/dllmain.c
+0
-10
init.c
dlls/winex11.drv/init.c
+1
-0
unixlib.h
dlls/winex11.drv/unixlib.h
+0
-8
window.c
dlls/winex11.drv/window.c
+25
-4
winex11.drv.spec
dlls/winex11.drv/winex11.drv.spec
+0
-3
x11drv.h
dlls/winex11.drv/x11drv.h
+1
-2
x11drv_main.c
dlls/winex11.drv/x11drv_main.c
+0
-2
No files found.
dlls/winex11.drv/desktop.c
View file @
4fcbbf8c
...
...
@@ -348,22 +348,22 @@ void X11DRV_init_desktop( Window win, unsigned int width, unsigned int height )
desktop_handler
.
free_monitors
=
X11DRV_desktop_free_monitors
;
desktop_handler
.
register_event_handlers
=
NULL
;
TRACE
(
"Display device functions are now handled by: Virtual Desktop
\n
"
);
X11DRV_DisplayDevices_Init
(
TRUE
);
}
/***********************************************************************
*
x11drv_create_d
esktop
*
X11DRV_CreateD
esktop
*
* Create the X11 desktop window for the desktop mode.
*/
NTSTATUS
x11drv_create_desktop
(
void
*
arg
)
BOOL
X11DRV_CreateDesktop
(
const
WCHAR
*
name
,
UINT
width
,
UINT
height
)
{
const
struct
create_desktop_params
*
params
=
arg
;
XSetWindowAttributes
win_attr
;
Window
win
;
Display
*
display
=
thread_init_display
();
TRACE
(
"%s %ux%u
\n
"
,
debugstr_w
(
name
),
width
,
height
);
/* Create window */
win_attr
.
event_mask
=
ExposureMask
|
KeyPressMask
|
KeyReleaseMask
|
EnterWindowMask
|
PointerMotionMask
|
ButtonPressMask
|
ButtonReleaseMask
|
FocusChangeMask
;
...
...
@@ -376,20 +376,12 @@ NTSTATUS x11drv_create_desktop( void *arg )
win_attr
.
colormap
=
None
;
win
=
XCreateWindow
(
display
,
DefaultRootWindow
(
display
),
0
,
0
,
params
->
width
,
params
->
height
,
0
,
default_visual
.
depth
,
InputOutput
,
0
,
0
,
width
,
height
,
0
,
default_visual
.
depth
,
InputOutput
,
default_visual
.
visual
,
CWEventMask
|
CWCursor
|
CWColormap
,
&
win_attr
);
if
(
!
win
)
return
FALSE
;
if
(
!
create_desktop_win_data
(
win
))
return
FALSE
;
X11DRV_init_desktop
(
win
,
params
->
width
,
params
->
height
);
if
(
is_desktop_fullscreen
())
{
TRACE
(
"setting desktop to fullscreen
\n
"
);
XChangeProperty
(
display
,
win
,
x11drv_atom
(
_NET_WM_STATE
),
XA_ATOM
,
32
,
PropModeReplace
,
(
unsigned
char
*
)
&
x11drv_atom
(
_NET_WM_STATE_FULLSCREEN
),
1
);
}
XFlush
(
display
);
X11DRV_init_desktop
(
win
,
width
,
height
);
return
TRUE
;
}
...
...
dlls/winex11.drv/dllmain.c
View file @
4fcbbf8c
...
...
@@ -74,16 +74,6 @@ BOOL WINAPI DllMain( HINSTANCE instance, DWORD reason, void *reserved )
return
TRUE
;
}
/***********************************************************************
* wine_create_desktop (winex11.@)
*/
BOOL
CDECL
wine_create_desktop
(
UINT
width
,
UINT
height
)
{
struct
create_desktop_params
params
=
{
.
width
=
width
,
.
height
=
height
};
return
X11DRV_CALL
(
create_desktop
,
&
params
);
}
/***********************************************************************
* AttachEventQueueToTablet (winex11.@)
*/
...
...
dlls/winex11.drv/init.c
View file @
4fcbbf8c
...
...
@@ -409,6 +409,7 @@ static const struct user_driver_funcs x11drv_funcs =
.
pGetCurrentDisplaySettings
=
X11DRV_GetCurrentDisplaySettings
,
.
pGetDisplayDepth
=
X11DRV_GetDisplayDepth
,
.
pUpdateDisplayDevices
=
X11DRV_UpdateDisplayDevices
,
.
pCreateDesktop
=
X11DRV_CreateDesktop
,
.
pCreateWindow
=
X11DRV_CreateWindow
,
.
pDesktopWindowProc
=
X11DRV_DesktopWindowProc
,
.
pDestroyWindow
=
X11DRV_DestroyWindow
,
...
...
dlls/winex11.drv/unixlib.h
View file @
4fcbbf8c
...
...
@@ -21,7 +21,6 @@
enum
x11drv_funcs
{
unix_create_desktop
,
unix_init
,
unix_systray_clear
,
unix_systray_dock
,
...
...
@@ -36,13 +35,6 @@ enum x11drv_funcs
#define X11DRV_CALL(func, params) WINE_UNIX_CALL( unix_ ## func, params )
/* x11drv_create_desktop params */
struct
create_desktop_params
{
UINT
width
;
UINT
height
;
};
/* x11drv_init params */
struct
init_params
{
...
...
dlls/winex11.drv/window.c
View file @
4fcbbf8c
...
...
@@ -1847,13 +1847,13 @@ BOOL X11DRV_DestroyNotify( HWND hwnd, XEvent *event )
/* initialize the desktop window id in the desktop manager process */
BOOL
create_desktop_win_data
(
Window
win
)
static
BOOL
create_desktop_win_data
(
Window
win
,
HWND
hwnd
)
{
struct
x11drv_thread_data
*
thread_data
=
x11drv_thread_data
();
Display
*
display
=
thread_data
->
display
;
struct
x11drv_win_data
*
data
;
if
(
!
(
data
=
alloc_win_data
(
display
,
NtUserGetDesktopWindow
()
)))
return
FALSE
;
if
(
!
(
data
=
alloc_win_data
(
display
,
hwnd
)))
return
FALSE
;
data
->
whole_window
=
win
;
data
->
managed
=
TRUE
;
NtUserSetProp
(
data
->
hwnd
,
whole_window_prop
,
(
HANDLE
)
win
);
...
...
@@ -1883,7 +1883,10 @@ void X11DRV_SetDesktopWindow( HWND hwnd )
if
(
!
width
&&
!
height
)
/* not initialized yet */
{
RECT
rect
=
NtUserGetVirtualScreenRect
();
RECT
rect
;
X11DRV_DisplayDevices_Init
(
TRUE
);
rect
=
NtUserGetVirtualScreenRect
();
SERVER_START_REQ
(
set_window_pos
)
{
...
...
@@ -1898,11 +1901,29 @@ void X11DRV_SetDesktopWindow( HWND hwnd )
wine_server_call
(
req
);
}
SERVER_END_REQ
;
if
(
!
is_virtual_desktop
())
return
;
if
(
!
create_desktop_win_data
(
root_window
,
hwnd
))
{
ERR
(
"Failed to create virtual desktop window data
\n
"
);
root_window
=
DefaultRootWindow
(
gdi_display
);
}
else
if
(
is_desktop_fullscreen
())
{
Display
*
display
=
x11drv_thread_data
()
->
display
;
TRACE
(
"setting desktop to fullscreen
\n
"
);
XChangeProperty
(
display
,
root_window
,
x11drv_atom
(
_NET_WM_STATE
),
XA_ATOM
,
32
,
PropModeReplace
,
(
unsigned
char
*
)
&
x11drv_atom
(
_NET_WM_STATE_FULLSCREEN
),
1
);
}
}
else
{
Window
win
=
(
Window
)
NtUserGetProp
(
hwnd
,
whole_window_prop
);
if
(
win
&&
win
!=
root_window
)
X11DRV_init_desktop
(
win
,
width
,
height
);
if
(
win
&&
win
!=
root_window
)
{
X11DRV_init_desktop
(
win
,
width
,
height
);
X11DRV_DisplayDevices_Init
(
TRUE
);
}
}
}
...
...
dlls/winex11.drv/winex11.drv.spec
View file @
4fcbbf8c
...
...
@@ -4,8 +4,5 @@
@ cdecl LoadTabletInfo(long) X11DRV_LoadTabletInfo
@ cdecl WTInfoW(long long ptr) X11DRV_WTInfoW
# Desktop
@ cdecl wine_create_desktop(long long)
# System tray
@ cdecl wine_notify_icon(long ptr)
dlls/winex11.drv/x11drv.h
View file @
4fcbbf8c
...
...
@@ -222,6 +222,7 @@ extern BOOL X11DRV_GetCurrentDisplaySettings( LPCWSTR name, BOOL is_primary, LPD
extern
INT
X11DRV_GetDisplayDepth
(
LPCWSTR
name
,
BOOL
is_primary
)
DECLSPEC_HIDDEN
;
extern
BOOL
X11DRV_UpdateDisplayDevices
(
const
struct
gdi_device_manager
*
device_manager
,
BOOL
force
,
void
*
param
)
DECLSPEC_HIDDEN
;
extern
BOOL
X11DRV_CreateDesktop
(
const
WCHAR
*
name
,
UINT
width
,
UINT
height
)
DECLSPEC_HIDDEN
;
extern
BOOL
X11DRV_CreateWindow
(
HWND
hwnd
)
DECLSPEC_HIDDEN
;
extern
LRESULT
X11DRV_DesktopWindowProc
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wp
,
LPARAM
lp
)
DECLSPEC_HIDDEN
;
extern
void
X11DRV_DestroyWindow
(
HWND
hwnd
)
DECLSPEC_HIDDEN
;
...
...
@@ -765,7 +766,6 @@ extern void X11DRV_resize_desktop(void) DECLSPEC_HIDDEN;
extern
BOOL
is_virtual_desktop
(
void
)
DECLSPEC_HIDDEN
;
extern
BOOL
is_desktop_fullscreen
(
void
)
DECLSPEC_HIDDEN
;
extern
BOOL
is_detached_mode
(
const
DEVMODEW
*
)
DECLSPEC_HIDDEN
;
extern
BOOL
create_desktop_win_data
(
Window
win
)
DECLSPEC_HIDDEN
;
void
X11DRV_Settings_Init
(
void
)
DECLSPEC_HIDDEN
;
void
X11DRV_XF86VM_Init
(
void
)
DECLSPEC_HIDDEN
;
...
...
@@ -843,7 +843,6 @@ static inline BOOL is_window_rect_mapped( const RECT *rect )
/* unixlib interface */
extern
NTSTATUS
x11drv_create_desktop
(
void
*
arg
)
DECLSPEC_HIDDEN
;
extern
NTSTATUS
x11drv_systray_clear
(
void
*
arg
)
DECLSPEC_HIDDEN
;
extern
NTSTATUS
x11drv_systray_dock
(
void
*
arg
)
DECLSPEC_HIDDEN
;
extern
NTSTATUS
x11drv_systray_hide
(
void
*
arg
)
DECLSPEC_HIDDEN
;
...
...
dlls/winex11.drv/x11drv_main.c
View file @
4fcbbf8c
...
...
@@ -1320,7 +1320,6 @@ NTSTATUS x11drv_client_call( enum client_callback func, UINT arg )
const
unixlib_entry_t
__wine_unix_call_funcs
[]
=
{
x11drv_create_desktop
,
x11drv_init
,
x11drv_systray_clear
,
x11drv_systray_dock
,
...
...
@@ -1408,7 +1407,6 @@ static NTSTATUS x11drv_wow64_tablet_info( void *arg )
const
unixlib_entry_t
__wine_unix_call_wow64_funcs
[]
=
{
x11drv_create_desktop
,
x11drv_wow64_init
,
x11drv_wow64_systray_clear
,
x11drv_wow64_systray_dock
,
...
...
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