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
377820e3
Commit
377820e3
authored
Oct 04, 2010
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Don't rely on the cached position for windows that have a mirrored parent.
parent
79ed8429
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
2 deletions
+31
-2
win.c
dlls/user32/win.c
+11
-0
win.h
dlls/user32/win.h
+1
-0
winpos.c
dlls/user32/winpos.c
+19
-2
No files found.
dlls/user32/win.c
View file @
377820e3
...
...
@@ -709,6 +709,12 @@ BOOL WIN_GetRectangles( HWND hwnd, enum coords_relative relative, RECT *rectWind
WIN_ReleasePtr
(
win
);
goto
other_process
;
}
if
(
parent
->
flags
&
WIN_CHILDREN_MOVED
)
{
WIN_ReleasePtr
(
parent
);
WIN_ReleasePtr
(
win
);
goto
other_process
;
}
if
(
parent
->
dwExStyle
&
WS_EX_LAYOUTRTL
)
{
mirror_rect
(
&
parent
->
rectClient
,
&
window_rect
);
...
...
@@ -728,6 +734,11 @@ BOOL WIN_GetRectangles( HWND hwnd, enum coords_relative relative, RECT *rectWind
goto
other_process
;
}
WIN_ReleasePtr
(
win
);
if
(
parent
->
flags
&
WIN_CHILDREN_MOVED
)
{
WIN_ReleasePtr
(
parent
);
goto
other_process
;
}
win
=
parent
;
OffsetRect
(
&
window_rect
,
win
->
rectClient
.
left
,
win
->
rectClient
.
top
);
OffsetRect
(
&
client_rect
,
win
->
rectClient
.
left
,
win
->
rectClient
.
top
);
...
...
dlls/user32/win.h
View file @
377820e3
...
...
@@ -72,6 +72,7 @@ typedef struct tagWND
#define WIN_ISMDICLIENT 0x0008
/* Window is an MDIClient */
#define WIN_ISUNICODE 0x0010
/* Window is Unicode */
#define WIN_NEEDS_SHOW_OWNEDPOPUP 0x0020
/* WM_SHOWWINDOW:SC_SHOW must be sent in the next ShowOwnedPopup call */
#define WIN_CHILDREN_MOVED 0x0040
/* children may have moved, ignore stored positions */
/* Window functions */
extern
HWND
get_hwnd_message_parent
(
void
)
DECLSPEC_HIDDEN
;
...
...
dlls/user32/winpos.c
View file @
377820e3
...
...
@@ -445,7 +445,7 @@ static POINT WINPOS_GetWinOffset( HWND hwndFrom, HWND hwndTo, BOOL *mirrored )
mirror_from
=
TRUE
;
offset
.
x
+=
wndPtr
->
rectClient
.
right
-
wndPtr
->
rectClient
.
left
;
}
while
(
wndPtr
!=
WND_DESKTOP
)
for
(;;
)
{
offset
.
x
+=
wndPtr
->
rectClient
.
left
;
offset
.
y
+=
wndPtr
->
rectClient
.
top
;
...
...
@@ -453,6 +453,12 @@ static POINT WINPOS_GetWinOffset( HWND hwndFrom, HWND hwndTo, BOOL *mirrored )
WIN_ReleasePtr
(
wndPtr
);
if
(
!
(
wndPtr
=
WIN_GetPtr
(
hwnd
)))
break
;
if
(
wndPtr
==
WND_OTHER_PROCESS
)
goto
other_process
;
if
(
wndPtr
==
WND_DESKTOP
)
break
;
if
(
wndPtr
->
flags
&
WIN_CHILDREN_MOVED
)
{
WIN_ReleasePtr
(
wndPtr
);
goto
other_process
;
}
}
}
}
...
...
@@ -469,7 +475,7 @@ static POINT WINPOS_GetWinOffset( HWND hwndFrom, HWND hwndTo, BOOL *mirrored )
mirror_to
=
TRUE
;
offset
.
x
-=
wndPtr
->
rectClient
.
right
-
wndPtr
->
rectClient
.
left
;
}
while
(
wndPtr
!=
WND_DESKTOP
)
for
(;;
)
{
offset
.
x
-=
wndPtr
->
rectClient
.
left
;
offset
.
y
-=
wndPtr
->
rectClient
.
top
;
...
...
@@ -477,6 +483,12 @@ static POINT WINPOS_GetWinOffset( HWND hwndFrom, HWND hwndTo, BOOL *mirrored )
WIN_ReleasePtr
(
wndPtr
);
if
(
!
(
wndPtr
=
WIN_GetPtr
(
hwnd
)))
break
;
if
(
wndPtr
==
WND_OTHER_PROCESS
)
goto
other_process
;
if
(
wndPtr
==
WND_DESKTOP
)
break
;
if
(
wndPtr
->
flags
&
WIN_CHILDREN_MOVED
)
{
WIN_ReleasePtr
(
wndPtr
);
goto
other_process
;
}
}
}
}
...
...
@@ -1932,6 +1944,7 @@ BOOL set_window_pos( HWND hwnd, HWND insert_after, UINT swp_flags,
WND
*
win
;
BOOL
ret
;
RECT
visible_rect
,
old_window_rect
;
int
old_width
;
visible_rect
=
*
window_rect
;
USER_Driver
->
pWindowPosChanging
(
hwnd
,
insert_after
,
swp_flags
,
...
...
@@ -1941,6 +1954,7 @@ BOOL set_window_pos( HWND hwnd, HWND insert_after, UINT swp_flags,
if
(
!
(
win
=
WIN_GetPtr
(
hwnd
)))
return
FALSE
;
if
(
win
==
WND_DESKTOP
||
win
==
WND_OTHER_PROCESS
)
return
FALSE
;
old_width
=
win
->
rectClient
.
right
-
win
->
rectClient
.
left
;
SERVER_START_REQ
(
set_window_pos
)
{
...
...
@@ -1974,6 +1988,9 @@ BOOL set_window_pos( HWND hwnd, HWND insert_after, UINT swp_flags,
mirror_rect
(
&
client
,
&
win
->
rectWindow
);
mirror_rect
(
&
client
,
&
win
->
rectClient
);
}
/* if an RTL window is resized the children have moved */
if
(
win
->
dwExStyle
&
WS_EX_LAYOUTRTL
&&
client_rect
->
right
-
client_rect
->
left
!=
old_width
)
win
->
flags
|=
WIN_CHILDREN_MOVED
;
}
}
SERVER_END_REQ
;
...
...
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