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
00e097b6
Commit
00e097b6
authored
Nov 14, 2006
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11.drv: Update the X11 window position when the primary monitor origin changes.
parent
0ca78828
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
11 deletions
+28
-11
winpos.c
dlls/winex11.drv/winpos.c
+28
-11
No files found.
dlls/winex11.drv/winpos.c
View file @
00e097b6
...
...
@@ -1224,17 +1224,36 @@ void X11DRV_UnmapNotify( HWND hwnd, XEvent *event )
else
WIN_ReleasePtr
(
win
);
}
struct
desktop_resize_data
{
RECT
old_screen_rect
;
RECT
old_virtual_rect
;
};
static
BOOL
CALLBACK
update_windows_
fullscreen_stat
e
(
HWND
hwnd
,
LPARAM
lparam
)
static
BOOL
CALLBACK
update_windows_
on_desktop_resiz
e
(
HWND
hwnd
,
LPARAM
lparam
)
{
struct
x11drv_win_data
*
data
;
Display
*
display
=
thread_display
();
RECT
*
old_screen_rect
=
(
RECT
*
)
lparam
;
struct
desktop_resize_data
*
resize_data
=
(
struct
desktop_resize_data
*
)
lparam
;
int
mask
=
0
;
if
(
!
(
data
=
X11DRV_get_win_data
(
hwnd
)))
return
TRUE
;
if
(
GetWindowLongW
(
hwnd
,
GWL_STYLE
)
&
WS_VISIBLE
)
update_fullscreen_state
(
display
,
data
,
&
data
->
client_rect
,
&
resize_data
->
old_screen_rect
);
if
((
data
=
X11DRV_get_win_data
(
hwnd
))
&&
(
GetWindowLongW
(
hwnd
,
GWL_STYLE
)
&
WS_VISIBLE
))
if
(
resize_data
->
old_virtual_rect
.
left
!=
virtual_screen_rect
.
left
)
mask
|=
CWX
;
if
(
resize_data
->
old_virtual_rect
.
top
!=
virtual_screen_rect
.
top
)
mask
|=
CWY
;
if
(
mask
&&
data
->
whole_window
)
{
update_fullscreen_state
(
display
,
data
,
&
data
->
client_rect
,
old_screen_rect
);
XWindowChanges
changes
;
wine_tsx11_lock
();
changes
.
x
=
data
->
whole_rect
.
left
-
virtual_screen_rect
.
left
;
changes
.
y
=
data
->
whole_rect
.
top
-
virtual_screen_rect
.
top
;
XReconfigureWMWindow
(
display
,
data
->
whole_window
,
DefaultScreen
(
display
),
mask
,
&
changes
);
wine_tsx11_unlock
();
}
return
TRUE
;
}
...
...
@@ -1245,15 +1264,14 @@ static BOOL CALLBACK update_windows_fullscreen_state( HWND hwnd, LPARAM lparam )
*/
void
X11DRV_handle_desktop_resize
(
unsigned
int
width
,
unsigned
int
height
)
{
unsigned
int
old_screen_width
,
old_screen_height
;
RECT
rect
;
HWND
hwnd
=
GetDesktopWindow
();
struct
x11drv_win_data
*
data
;
struct
desktop_resize_data
resize_data
;
if
(
!
(
data
=
X11DRV_get_win_data
(
hwnd
)))
return
;
old_screen_width
=
screen_width
;
old_screen_height
=
screen_heigh
t
;
SetRect
(
&
resize_data
.
old_screen_rect
,
0
,
0
,
screen_width
,
screen_height
)
;
resize_data
.
old_virtual_rect
=
virtual_screen_rec
t
;
screen_width
=
width
;
screen_height
=
height
;
...
...
@@ -1266,8 +1284,7 @@ void X11DRV_handle_desktop_resize( unsigned int width, unsigned int height )
SendMessageTimeoutW
(
HWND_BROADCAST
,
WM_DISPLAYCHANGE
,
screen_depth
,
MAKELPARAM
(
width
,
height
),
SMTO_ABORTIFHUNG
,
2000
,
NULL
);
SetRect
(
&
rect
,
0
,
0
,
old_screen_width
,
old_screen_height
);
EnumWindows
(
update_windows_fullscreen_state
,
(
LPARAM
)
&
rect
);
EnumWindows
(
update_windows_on_desktop_resize
,
(
LPARAM
)
&
resize_data
);
}
...
...
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