Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-fonts
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
Aleksandr Isakov
wine-fonts
Commits
d076dfa8
Commit
d076dfa8
authored
Oct 04, 2010
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Update child window positions when resizing a mirrored parent.
parent
377820e3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
2 deletions
+37
-2
win.c
dlls/user32/tests/win.c
+20
-0
window.c
server/window.c
+17
-2
No files found.
dlls/user32/tests/win.c
View file @
d076dfa8
...
...
@@ -6213,6 +6213,26 @@ static void test_rtl_layout(void)
pt
.
x
=
pt
.
y
=
12
;
MapWindowPoints
(
child
,
parent
,
&
pt
,
1
);
ok
(
pt
.
x
==
22
&&
pt
.
y
==
22
,
"wrong point %d,%d
\n
"
,
pt
.
x
,
pt
.
y
);
SetWindowPos
(
parent
,
0
,
0
,
0
,
250
,
250
,
SWP_NOMOVE
|
SWP_NOZORDER
|
SWP_NOACTIVATE
);
GetWindowRect
(
parent
,
&
r
);
ok
(
r
.
left
==
100
&&
r
.
right
==
350
,
"wrong rect %d,%d - %d,%d
\n
"
,
r
.
left
,
r
.
top
,
r
.
right
,
r
.
bottom
);
GetWindowRect
(
child
,
&
r
);
ok
(
r
.
left
==
320
&&
r
.
right
==
340
,
"wrong rect %d,%d - %d,%d
\n
"
,
r
.
left
,
r
.
top
,
r
.
right
,
r
.
bottom
);
SetWindowLongW
(
parent
,
GWL_EXSTYLE
,
0
);
GetWindowRect
(
child
,
&
r
);
ok
(
r
.
left
==
320
&&
r
.
right
==
340
,
"wrong rect %d,%d - %d,%d
\n
"
,
r
.
left
,
r
.
top
,
r
.
right
,
r
.
bottom
);
MapWindowPoints
(
NULL
,
parent
,
(
POINT
*
)
&
r
,
2
);
ok
(
r
.
left
==
220
&&
r
.
right
==
240
,
"wrong rect %d,%d - %d,%d
\n
"
,
r
.
left
,
r
.
top
,
r
.
right
,
r
.
bottom
);
SetWindowLongW
(
parent
,
GWL_EXSTYLE
,
WS_EX_LAYOUTRTL
);
GetWindowRect
(
child
,
&
r
);
ok
(
r
.
left
==
320
&&
r
.
right
==
340
,
"wrong rect %d,%d - %d,%d
\n
"
,
r
.
left
,
r
.
top
,
r
.
right
,
r
.
bottom
);
MapWindowPoints
(
NULL
,
parent
,
(
POINT
*
)
&
r
,
2
);
ok
(
r
.
left
==
10
&&
r
.
right
==
30
,
"wrong rect %d,%d - %d,%d
\n
"
,
r
.
left
,
r
.
top
,
r
.
right
,
r
.
bottom
);
SetWindowPos
(
child
,
0
,
0
,
0
,
30
,
30
,
SWP_NOMOVE
|
SWP_NOZORDER
|
SWP_NOACTIVATE
);
GetWindowRect
(
child
,
&
r
);
ok
(
r
.
left
==
310
&&
r
.
right
==
340
,
"wrong rect %d,%d - %d,%d
\n
"
,
r
.
left
,
r
.
top
,
r
.
right
,
r
.
bottom
);
MapWindowPoints
(
NULL
,
parent
,
(
POINT
*
)
&
r
,
2
);
ok
(
r
.
left
==
10
&&
r
.
right
==
40
,
"wrong rect %d,%d - %d,%d
\n
"
,
r
.
left
,
r
.
top
,
r
.
right
,
r
.
bottom
);
DestroyWindow
(
child
);
DestroyWindow
(
parent
);
}
...
...
server/window.c
View file @
d076dfa8
...
...
@@ -1536,6 +1536,21 @@ static void set_window_pos( struct window *win, struct window *previous,
if
(
swp_flags
&
SWP_SHOWWINDOW
)
win
->
style
|=
WS_VISIBLE
;
else
if
(
swp_flags
&
SWP_HIDEWINDOW
)
win
->
style
&=
~
WS_VISIBLE
;
/* keep children at the same position relative to top right corner when the parent is mirrored */
if
(
win
->
ex_style
&
WS_EX_LAYOUTRTL
)
{
struct
window
*
child
;
int
old_size
=
old_client_rect
.
right
-
old_client_rect
.
left
;
int
new_size
=
win
->
client_rect
.
right
-
win
->
client_rect
.
left
;
if
(
old_size
!=
new_size
)
LIST_FOR_EACH_ENTRY
(
child
,
&
win
->
children
,
struct
window
,
entry
)
{
offset_rect
(
&
child
->
window_rect
,
new_size
-
old_size
,
0
);
offset_rect
(
&
child
->
visible_rect
,
new_size
-
old_size
,
0
);
offset_rect
(
&
child
->
client_rect
,
new_size
-
old_size
,
0
);
}
}
/* if the window is not visible, everything is easy */
if
(
!
visible
)
return
;
...
...
@@ -2237,7 +2252,7 @@ DECL_HANDLER(get_windows_offset)
if
(
win
->
ex_style
&
WS_EX_LAYOUTRTL
)
{
mirror_from
=
1
;
reply
->
x
+=
win
->
client_rect
.
right
-
win
->
client_rect
.
left
-
1
;
reply
->
x
+=
win
->
client_rect
.
right
-
win
->
client_rect
.
left
;
}
while
(
win
&&
!
is_desktop_window
(
win
))
{
...
...
@@ -2252,7 +2267,7 @@ DECL_HANDLER(get_windows_offset)
if
(
win
->
ex_style
&
WS_EX_LAYOUTRTL
)
{
mirror_to
=
1
;
reply
->
x
-=
win
->
client_rect
.
right
-
win
->
client_rect
.
left
-
1
;
reply
->
x
-=
win
->
client_rect
.
right
-
win
->
client_rect
.
left
;
}
while
(
win
&&
!
is_desktop_window
(
win
))
{
...
...
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