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
e10da7ab
Commit
e10da7ab
authored
Apr 26, 2023
by
Alexandros Frantzis
Committed by
Alexandre Julliard
May 24, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winewayland.drv: Update desktop window size on display changes.
Update the desktop window size to match the current virtual screen rect.
parent
82c6becb
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
0 deletions
+28
-0
waylanddrv.h
dlls/winewayland.drv/waylanddrv.h
+1
-0
waylanddrv_main.c
dlls/winewayland.drv/waylanddrv_main.c
+1
-0
window.c
dlls/winewayland.drv/window.c
+26
-0
No files found.
dlls/winewayland.drv/waylanddrv.h
View file @
e10da7ab
...
...
@@ -110,6 +110,7 @@ void wayland_output_use_xdg_extension(struct wayland_output *output) DECLSPEC_HI
* USER driver functions
*/
LRESULT
WAYLAND_DesktopWindowProc
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wp
,
LPARAM
lp
)
DECLSPEC_HIDDEN
;
BOOL
WAYLAND_UpdateDisplayDevices
(
const
struct
gdi_device_manager
*
device_manager
,
BOOL
force
,
void
*
param
)
DECLSPEC_HIDDEN
;
LRESULT
WAYLAND_WindowMessage
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wp
,
LPARAM
lp
)
DECLSPEC_HIDDEN
;
...
...
dlls/winewayland.drv/waylanddrv_main.c
View file @
e10da7ab
...
...
@@ -31,6 +31,7 @@
static
const
struct
user_driver_funcs
waylanddrv_funcs
=
{
.
pDesktopWindowProc
=
WAYLAND_DesktopWindowProc
,
.
pUpdateDisplayDevices
=
WAYLAND_UpdateDisplayDevices
,
.
pWindowMessage
=
WAYLAND_WindowMessage
};
...
...
dlls/winewayland.drv/window.c
View file @
e10da7ab
...
...
@@ -30,6 +30,16 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
waylanddrv
);
static
void
wayland_resize_desktop
(
void
)
{
RECT
virtual_rect
=
NtUserGetVirtualScreenRect
();
NtUserSetWindowPos
(
NtUserGetDesktopWindow
(),
0
,
virtual_rect
.
left
,
virtual_rect
.
top
,
virtual_rect
.
right
-
virtual_rect
.
left
,
virtual_rect
.
bottom
-
virtual_rect
.
top
,
SWP_NOZORDER
|
SWP_NOACTIVATE
|
SWP_DEFERERASE
);
}
/**********************************************************************
* WAYLAND_WindowMessage
*/
...
...
@@ -39,9 +49,25 @@ LRESULT WAYLAND_WindowMessage(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp)
{
case
WM_WAYLAND_INIT_DISPLAY_DEVICES
:
wayland_init_display_devices
(
TRUE
);
wayland_resize_desktop
();
return
0
;
default:
FIXME
(
"got window msg %x hwnd %p wp %lx lp %lx
\n
"
,
msg
,
hwnd
,
(
long
)
wp
,
lp
);
return
0
;
}
}
/**********************************************************************
* WAYLAND_DesktopWindowProc
*/
LRESULT
WAYLAND_DesktopWindowProc
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wp
,
LPARAM
lp
)
{
switch
(
msg
)
{
case
WM_DISPLAYCHANGE
:
wayland_resize_desktop
();
break
;
}
return
NtUserMessageCall
(
hwnd
,
msg
,
wp
,
lp
,
0
,
NtUserDefWindowProc
,
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