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
bc09f081
Commit
bc09f081
authored
Sep 27, 2022
by
Rémi Bernon
Committed by
Alexandre Julliard
Oct 12, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11.drv: Sync window positions in a WM_X11DRV_DESKTOP_RESIZED message.
After desktop is resized, instead of doing it only for the current process windows.
parent
89bb66af
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
38 additions
and
43 deletions
+38
-43
desktop.c
dlls/winex11.drv/desktop.c
+14
-9
display.c
dlls/winex11.drv/display.c
+0
-34
window.c
dlls/winex11.drv/window.c
+23
-0
x11drv.h
dlls/winex11.drv/x11drv.h
+1
-0
No files found.
dlls/winex11.drv/desktop.c
View file @
bc09f081
...
...
@@ -456,6 +456,8 @@ static void update_desktop_fullscreen( unsigned int width, unsigned int height)
*/
void
X11DRV_resize_desktop
(
void
)
{
static
RECT
old_virtual_rect
;
RECT
primary_rect
,
virtual_rect
;
HWND
hwnd
=
NtUserGetDesktopWindow
();
INT
width
,
height
;
...
...
@@ -468,14 +470,17 @@ void X11DRV_resize_desktop(void)
if
(
NtUserGetWindowThread
(
hwnd
,
NULL
)
!=
GetCurrentThreadId
())
{
send_message
(
hwnd
,
WM_X11DRV_RESIZE_DESKTOP
,
0
,
0
);
return
;
}
else
{
TRACE
(
"desktop %p change to (%dx%d)
\n
"
,
hwnd
,
width
,
height
);
update_desktop_fullscreen
(
width
,
height
);
NtUserSetWindowPos
(
hwnd
,
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
);
ungrab_clipping_window
();
}
TRACE
(
"desktop %p change to (%dx%d)
\n
"
,
hwnd
,
width
,
height
);
update_desktop_fullscreen
(
width
,
height
);
NtUserSetWindowPos
(
hwnd
,
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
);
ungrab_clipping_window
();
send_message_timeout
(
HWND_BROADCAST
,
WM_X11DRV_DESKTOP_RESIZED
,
old_virtual_rect
.
left
,
old_virtual_rect
.
top
,
SMTO_ABORTIFHUNG
,
2000
,
FALSE
);
old_virtual_rect
=
virtual_rect
;
}
dlls/winex11.drv/display.c
View file @
bc09f081
...
...
@@ -560,47 +560,13 @@ void X11DRV_DisplayDevices_RegisterEventHandlers(void)
void
X11DRV_DisplayDevices_Update
(
void
)
{
RECT
old_virtual_rect
,
new_virtual_rect
;
DWORD
tid
,
pid
;
HWND
foreground
;
UINT
mask
=
0
,
i
;
HWND
*
list
;
old_virtual_rect
=
NtUserGetVirtualScreenRect
();
X11DRV_DisplayDevices_Init
(
TRUE
);
new_virtual_rect
=
NtUserGetVirtualScreenRect
();
/* Calculate XReconfigureWMWindow() mask */
if
(
old_virtual_rect
.
left
!=
new_virtual_rect
.
left
)
mask
|=
CWX
;
if
(
old_virtual_rect
.
top
!=
new_virtual_rect
.
top
)
mask
|=
CWY
;
X11DRV_resize_desktop
();
list
=
build_hwnd_list
();
for
(
i
=
0
;
list
&&
list
[
i
]
!=
HWND_BOTTOM
;
i
++
)
{
struct
x11drv_win_data
*
data
;
if
(
!
(
data
=
get_win_data
(
list
[
i
]
)))
continue
;
/* update the full screen state */
update_net_wm_states
(
data
);
if
(
mask
&&
data
->
whole_window
)
{
POINT
pos
=
virtual_screen_to_root
(
data
->
whole_rect
.
left
,
data
->
whole_rect
.
top
);
XWindowChanges
changes
;
changes
.
x
=
pos
.
x
;
changes
.
y
=
pos
.
y
;
XReconfigureWMWindow
(
data
->
display
,
data
->
whole_window
,
data
->
vis
.
screen
,
mask
,
&
changes
);
}
release_win_data
(
data
);
}
free
(
list
);
/* forward clip_fullscreen_window request to the foreground window */
if
((
foreground
=
NtUserGetForegroundWindow
())
&&
(
tid
=
NtUserGetWindowThread
(
foreground
,
&
pid
))
&&
pid
==
GetCurrentProcessId
())
...
...
dlls/winex11.drv/window.c
View file @
bc09f081
...
...
@@ -2996,6 +2996,29 @@ LRESULT X11DRV_WindowMessage( HWND hwnd, UINT msg, WPARAM wp, LPARAM lp )
case
WM_X11DRV_RESIZE_DESKTOP
:
X11DRV_resize_desktop
();
return
0
;
case
WM_X11DRV_DESKTOP_RESIZED
:
if
((
data
=
get_win_data
(
hwnd
)))
{
/* update the full screen state */
update_net_wm_states
(
data
);
if
(
data
->
whole_window
)
{
/* sync window position with the new virtual screen rect */
POINT
old_pos
=
{.
x
=
data
->
whole_rect
.
left
-
wp
,
.
y
=
data
->
whole_rect
.
top
-
lp
};
POINT
pos
=
virtual_screen_to_root
(
data
->
whole_rect
.
left
,
data
->
whole_rect
.
top
);
XWindowChanges
changes
=
{.
x
=
pos
.
x
,
.
y
=
pos
.
y
};
UINT
mask
=
0
;
if
(
old_pos
.
x
!=
pos
.
x
)
mask
|=
CWX
;
if
(
old_pos
.
y
!=
pos
.
y
)
mask
|=
CWY
;
if
(
mask
)
XReconfigureWMWindow
(
data
->
display
,
data
->
whole_window
,
data
->
vis
.
screen
,
mask
,
&
changes
);
}
release_win_data
(
data
);
}
return
0
;
case
WM_X11DRV_SET_CURSOR
:
{
Window
win
=
0
;
...
...
dlls/winex11.drv/x11drv.h
View file @
bc09f081
...
...
@@ -573,6 +573,7 @@ enum x11drv_window_messages
WM_X11DRV_UPDATE_CLIPBOARD
=
0x80001000
,
WM_X11DRV_SET_WIN_REGION
,
WM_X11DRV_RESIZE_DESKTOP
,
WM_X11DRV_DESKTOP_RESIZED
,
WM_X11DRV_SET_CURSOR
,
WM_X11DRV_CLIP_CURSOR_NOTIFY
,
WM_X11DRV_CLIP_CURSOR_REQUEST
,
...
...
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