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
9bbfcb5b
Commit
9bbfcb5b
authored
Sep 23, 2010
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Add support for RTL window layouts in GetUpdateRgn and GetUpdateRect.
parent
02452119
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
5 deletions
+39
-5
painting.c
dlls/user32/painting.c
+3
-5
win.h
dlls/user32/win.h
+1
-0
winpos.c
dlls/user32/winpos.c
+35
-0
No files found.
dlls/user32/painting.c
View file @
9bbfcb5b
...
...
@@ -1289,8 +1289,6 @@ INT WINAPI GetUpdateRgn( HWND hwnd, HRGN hrgn, BOOL erase )
if
((
update_rgn
=
send_ncpaint
(
hwnd
,
NULL
,
&
flags
)))
{
POINT
offset
;
retval
=
CombineRgn
(
hrgn
,
update_rgn
,
0
,
RGN_COPY
);
if
(
send_erase
(
hwnd
,
flags
,
update_rgn
,
NULL
,
NULL
))
{
...
...
@@ -1298,9 +1296,7 @@ INT WINAPI GetUpdateRgn( HWND hwnd, HRGN hrgn, BOOL erase )
get_update_flags
(
hwnd
,
NULL
,
&
flags
);
}
/* map region to client coordinates */
offset
.
x
=
offset
.
y
=
0
;
ScreenToClient
(
hwnd
,
&
offset
);
OffsetRgn
(
hrgn
,
offset
.
x
,
offset
.
y
);
map_window_region
(
0
,
hwnd
,
hrgn
);
}
return
retval
;
}
...
...
@@ -1324,8 +1320,10 @@ BOOL WINAPI GetUpdateRect( HWND hwnd, LPRECT rect, BOOL erase )
if
(
GetRgnBox
(
update_rgn
,
rect
)
!=
NULLREGION
)
{
HDC
hdc
=
GetDCEx
(
hwnd
,
0
,
DCX_USESTYLE
);
DWORD
layout
=
SetLayout
(
hdc
,
0
);
/* MapWindowPoints mirrors already */
MapWindowPoints
(
0
,
hwnd
,
(
LPPOINT
)
rect
,
2
);
DPtoLP
(
hdc
,
(
LPPOINT
)
rect
,
2
);
SetLayout
(
hdc
,
layout
);
ReleaseDC
(
hwnd
,
hdc
);
}
}
...
...
dlls/user32/win.h
View file @
9bbfcb5b
...
...
@@ -83,6 +83,7 @@ extern HWND WIN_IsCurrentThread( HWND hwnd ) DECLSPEC_HIDDEN;
extern
HWND
WIN_SetOwner
(
HWND
hwnd
,
HWND
owner
)
DECLSPEC_HIDDEN
;
extern
ULONG
WIN_SetStyle
(
HWND
hwnd
,
ULONG
set_bits
,
ULONG
clear_bits
)
DECLSPEC_HIDDEN
;
extern
BOOL
WIN_GetRectangles
(
HWND
hwnd
,
enum
coords_relative
relative
,
RECT
*
rectWindow
,
RECT
*
rectClient
)
DECLSPEC_HIDDEN
;
extern
void
map_window_region
(
HWND
from
,
HWND
to
,
HRGN
hrgn
)
DECLSPEC_HIDDEN
;
extern
LRESULT
WIN_DestroyWindow
(
HWND
hwnd
)
DECLSPEC_HIDDEN
;
extern
void
WIN_DestroyThreadWindows
(
HWND
hwnd
)
DECLSPEC_HIDDEN
;
extern
HWND
WIN_CreateWindowEx
(
CREATESTRUCTW
*
cs
,
LPCWSTR
className
,
HINSTANCE
module
,
BOOL
unicode
)
DECLSPEC_HIDDEN
;
...
...
dlls/user32/winpos.c
View file @
9bbfcb5b
...
...
@@ -501,6 +501,41 @@ static POINT WINPOS_GetWinOffset( HWND hwndFrom, HWND hwndTo, BOOL *mirrored )
return
offset
;
}
/* map coordinates of a window region */
void
map_window_region
(
HWND
from
,
HWND
to
,
HRGN
hrgn
)
{
BOOL
mirrored
;
POINT
offset
=
WINPOS_GetWinOffset
(
from
,
to
,
&
mirrored
);
UINT
i
,
size
;
RGNDATA
*
data
;
HRGN
new_rgn
;
RECT
*
rect
;
if
(
!
mirrored
)
{
OffsetRgn
(
hrgn
,
offset
.
x
,
offset
.
y
);
return
;
}
if
(
!
(
size
=
GetRegionData
(
hrgn
,
0
,
NULL
)))
return
;
if
(
!
(
data
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
)))
return
;
GetRegionData
(
hrgn
,
size
,
data
);
rect
=
(
RECT
*
)
data
->
Buffer
;
for
(
i
=
0
;
i
<
data
->
rdh
.
nCount
;
i
++
)
{
int
tmp
=
-
(
rect
[
i
].
left
+
offset
.
x
);
rect
[
i
].
left
=
-
(
rect
[
i
].
right
+
offset
.
x
);
rect
[
i
].
right
=
tmp
;
rect
[
i
].
top
+=
offset
.
y
;
rect
[
i
].
bottom
+=
offset
.
y
;
}
if
((
new_rgn
=
ExtCreateRegion
(
NULL
,
data
->
rdh
.
nCount
,
data
)))
{
CombineRgn
(
hrgn
,
new_rgn
,
0
,
RGN_COPY
);
DeleteObject
(
new_rgn
);
}
HeapFree
(
GetProcessHeap
(),
0
,
data
);
}
/*******************************************************************
* MapWindowPoints (USER32.@)
...
...
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