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
9b693dda
Commit
9b693dda
authored
Sep 07, 2010
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Use WIN_GetRectangles where possible instead of mapping coordinates explicitly.
parent
141defbd
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
7 additions
and
19 deletions
+7
-19
edit.c
dlls/user32/edit.c
+1
-2
mdi.c
dlls/user32/mdi.c
+1
-2
menu.c
dlls/user32/menu.c
+1
-2
painting.c
dlls/user32/painting.c
+2
-4
win.c
dlls/user32/win.c
+1
-6
winpos.c
dlls/user32/winpos.c
+1
-3
No files found.
dlls/user32/edit.c
View file @
9b693dda
...
...
@@ -3109,8 +3109,7 @@ static void EDIT_WM_ContextMenu(EDITSTATE *es, INT x, INT y)
{
RECT
rc
;
/* Windows places the menu at the edit's center in this case */
GetClientRect
(
es
->
hwndSelf
,
&
rc
);
MapWindowPoints
(
es
->
hwndSelf
,
0
,
(
POINT
*
)
&
rc
,
2
);
WIN_GetRectangles
(
es
->
hwndSelf
,
COORDS_SCREEN
,
NULL
,
&
rc
);
x
=
rc
.
left
+
(
rc
.
right
-
rc
.
left
)
/
2
;
y
=
rc
.
top
+
(
rc
.
bottom
-
rc
.
top
)
/
2
;
}
...
...
dlls/user32/mdi.c
View file @
9b693dda
...
...
@@ -1720,13 +1720,12 @@ void WINAPI CalcChildScroll( HWND hwnd, INT scroll )
if
(
style
&
WS_VISIBLE
)
{
RECT
rect
;
GetWindowRect
(
list
[
i
],
&
rect
);
WIN_GetRectangles
(
list
[
i
],
COORDS_PARENT
,
&
rect
,
NULL
);
UnionRect
(
&
childRect
,
&
rect
,
&
childRect
);
}
}
HeapFree
(
GetProcessHeap
(),
0
,
list
);
}
MapWindowPoints
(
0
,
hwnd
,
(
POINT
*
)
&
childRect
,
2
);
UnionRect
(
&
childRect
,
&
clientRect
,
&
childRect
);
/* set common info values */
...
...
dlls/user32/menu.c
View file @
9b693dda
...
...
@@ -3632,8 +3632,7 @@ BOOL WINAPI EnableMenuItem( HMENU hMenu, UINT wItemID, UINT wFlags )
return
(
UINT
)
-
1
;
/* Refresh the frame to reflect the change */
GetWindowRect
(
parentMenu
->
hWnd
,
&
rc
);
MapWindowPoints
(
0
,
parentMenu
->
hWnd
,
(
POINT
*
)
&
rc
,
2
);
WIN_GetRectangles
(
parentMenu
->
hWnd
,
COORDS_CLIENT
,
&
rc
,
NULL
);
rc
.
bottom
=
0
;
RedrawWindow
(
parentMenu
->
hWnd
,
&
rc
,
0
,
RDW_FRAME
|
RDW_INVALIDATE
|
RDW_NOCHILDREN
);
}
...
...
dlls/user32/painting.c
View file @
9b693dda
...
...
@@ -637,8 +637,7 @@ static HRGN send_ncpaint( HWND hwnd, HWND *child, UINT *flags )
/* check if update rgn overlaps with nonclient area */
type
=
GetRgnBox
(
whole_rgn
,
&
update
);
GetClientRect
(
hwnd
,
&
client
);
MapWindowPoints
(
hwnd
,
0
,
(
POINT
*
)
&
client
,
2
);
WIN_GetRectangles
(
hwnd
,
COORDS_SCREEN
,
0
,
&
client
);
if
((
*
flags
&
UPDATE_NONCLIENT
)
||
update
.
left
<
client
.
left
||
update
.
top
<
client
.
top
||
...
...
@@ -1486,8 +1485,7 @@ INT WINAPI ScrollWindowEx( HWND hwnd, INT dx, INT dy,
RECT
r
,
dummy
;
for
(
i
=
0
;
list
[
i
];
i
++
)
{
GetWindowRect
(
list
[
i
],
&
r
);
MapWindowPoints
(
0
,
hwnd
,
(
POINT
*
)
&
r
,
2
);
WIN_GetRectangles
(
list
[
i
],
COORDS_PARENT
,
&
r
,
NULL
);
if
(
!
rect
||
IntersectRect
(
&
dummy
,
&
r
,
rect
))
SetWindowPos
(
list
[
i
],
0
,
r
.
left
+
dx
,
r
.
top
+
dy
,
0
,
0
,
SWP_NOZORDER
|
SWP_NOSIZE
|
SWP_NOACTIVATE
|
...
...
dlls/user32/win.c
View file @
9b693dda
...
...
@@ -3350,12 +3350,7 @@ UINT WINAPI GetWindowModuleFileNameW( HWND hwnd, LPWSTR module, UINT size )
BOOL
WINAPI
GetWindowInfo
(
HWND
hwnd
,
PWINDOWINFO
pwi
)
{
if
(
!
pwi
)
return
FALSE
;
if
(
!
IsWindow
(
hwnd
))
return
FALSE
;
GetWindowRect
(
hwnd
,
&
pwi
->
rcWindow
);
GetClientRect
(
hwnd
,
&
pwi
->
rcClient
);
/* translate to screen coordinates */
MapWindowPoints
(
hwnd
,
0
,
(
LPPOINT
)
&
pwi
->
rcClient
,
2
);
if
(
!
WIN_GetRectangles
(
hwnd
,
COORDS_SCREEN
,
&
pwi
->
rcWindow
,
&
pwi
->
rcClient
))
return
FALSE
;
pwi
->
dwStyle
=
GetWindowLongW
(
hwnd
,
GWL_STYLE
);
pwi
->
dwExStyle
=
GetWindowLongW
(
hwnd
,
GWL_EXSTYLE
);
...
...
dlls/user32/winpos.c
View file @
9b693dda
...
...
@@ -2428,12 +2428,10 @@ void WINPOS_SysCommandSizeMove( HWND hwnd, WPARAM wParam )
/* Get min/max info */
WINPOS_GetMinMaxInfo
(
hwnd
,
NULL
,
NULL
,
&
minTrack
,
&
maxTrack
);
GetWindowRect
(
hwnd
,
&
sizingRect
);
WIN_GetRectangles
(
hwnd
,
COORDS_PARENT
,
&
sizingRect
,
NULL
);
if
(
style
&
WS_CHILD
)
{
parent
=
GetParent
(
hwnd
);
/* make sizing rect relative to parent */
MapWindowPoints
(
0
,
parent
,
(
POINT
*
)
&
sizingRect
,
2
);
GetClientRect
(
parent
,
&
mouseRect
);
}
else
...
...
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