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
e59ec7cd
Commit
e59ec7cd
authored
Jun 28, 2004
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use X11DRV_GetRegionData to implement X11DRV_SetWindowRgn instead of
duplicating that functionality.
parent
2d63dae1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
40 deletions
+8
-40
winpos.c
dlls/x11drv/winpos.c
+8
-40
No files found.
dlls/x11drv/winpos.c
View file @
e59ec7cd
...
...
@@ -1687,51 +1687,19 @@ int X11DRV_SetWindowRgn( HWND hwnd, HRGN hrgn, BOOL redraw )
}
else
{
XRectangle
*
aXRect
;
int
x_offset
,
y_offset
;
DWORD
size
;
DWORD
dwBufferSize
=
GetRegionData
(
hrgn
,
0
,
NULL
);
PRGNDATA
pRegionData
=
HeapAlloc
(
GetProcessHeap
(),
0
,
dwBufferSize
);
if
(
!
pRegionData
)
RGNDATA
*
pRegionData
=
X11DRV_GetRegionData
(
hrgn
,
0
);
if
(
pRegionData
)
{
WIN_ReleasePtr
(
wndPtr
);
return
TRUE
;
}
GetRegionData
(
hrgn
,
dwBufferSize
,
pRegionData
);
size
=
pRegionData
->
rdh
.
nCount
;
x_offset
=
wndPtr
->
rectWindow
.
left
-
data
->
whole_rect
.
left
;
y_offset
=
wndPtr
->
rectWindow
.
top
-
data
->
whole_rect
.
top
;
/* convert region's "Windows rectangles" to XRectangles */
aXRect
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
*
sizeof
(
*
aXRect
)
);
if
(
aXRect
)
{
XRectangle
*
pCurrRect
=
aXRect
;
RECT
*
pRect
=
(
RECT
*
)
pRegionData
->
Buffer
;
for
(;
pRect
<
((
RECT
*
)
pRegionData
->
Buffer
)
+
size
;
++
pRect
,
++
pCurrRect
)
{
pCurrRect
->
x
=
pRect
->
left
+
x_offset
;
pCurrRect
->
y
=
pRect
->
top
+
y_offset
;
pCurrRect
->
height
=
pRect
->
bottom
-
pRect
->
top
;
pCurrRect
->
width
=
pRect
->
right
-
pRect
->
left
;
TRACE
(
"Rectangle %04d of %04ld data: X=%04d, Y=%04d, Height=%04d, Width=%04d.
\n
"
,
pRect
-
(
RECT
*
)
pRegionData
->
Buffer
,
size
,
pCurrRect
->
x
,
pCurrRect
->
y
,
pCurrRect
->
height
,
pCurrRect
->
width
);
}
/* shape = non-rectangular windows (X11/extensions) */
wine_tsx11_lock
();
XShapeCombineRectangles
(
display
,
data
->
whole_window
,
ShapeBounding
,
0
,
0
,
aXRect
,
pCurrRect
-
aXRect
,
ShapeSet
,
YXBanded
);
wndPtr
->
rectWindow
.
left
-
data
->
whole_rect
.
left
,
wndPtr
->
rectWindow
.
top
-
data
->
whole_rect
.
top
,
(
XRectangle
*
)
pRegionData
->
Buffer
,
pRegionData
->
rdh
.
nCount
,
ShapeSet
,
YXBanded
);
wine_tsx11_unlock
();
HeapFree
(
GetProcessHeap
(),
0
,
aXRect
);
HeapFree
(
GetProcessHeap
(),
0
,
pRegionData
);
}
HeapFree
(
GetProcessHeap
(),
0
,
pRegionData
);
}
}
}
...
...
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