Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
bc6f2f86
Commit
bc6f2f86
authored
Apr 25, 2012
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11: Store the DC bounds rectangle as a pointer.
parent
3ea711dd
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
22 deletions
+9
-22
graphics.c
dlls/winex11.drv/graphics.c
+1
-0
init.c
dlls/winex11.drv/init.c
+7
-21
x11drv.h
dlls/winex11.drv/x11drv.h
+1
-1
No files found.
dlls/winex11.drv/graphics.c
View file @
bc6f2f86
...
...
@@ -109,6 +109,7 @@ static void add_pen_device_bounds( X11DRV_PDEVICE *dev, const POINT *points, int
RECT
bounds
,
rect
;
int
width
=
0
;
if
(
!
dev
->
bounds
)
return
;
reset_bounds
(
&
bounds
);
if
(
dev
->
pen
.
type
&
PS_GEOMETRIC
||
dev
->
pen
.
width
>
1
)
...
...
dlls/winex11.drv/init.c
View file @
bc6f2f86
...
...
@@ -118,7 +118,6 @@ static X11DRV_PDEVICE *create_x11_physdev( Drawable drawable )
if
(
!
(
physDev
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
physDev
)
)))
return
NULL
;
reset_bounds
(
&
physDev
->
bounds
);
wine_tsx11_lock
();
physDev
->
drawable
=
drawable
;
physDev
->
gc
=
XCreateGC
(
gdi_display
,
drawable
,
0
,
NULL
);
...
...
@@ -192,37 +191,24 @@ void add_device_bounds( X11DRV_PDEVICE *dev, const RECT *rect )
{
RECT
rc
;
if
(
!
dev
->
bounds
)
return
;
if
(
dev
->
region
&&
GetRgnBox
(
dev
->
region
,
&
rc
))
{
if
(
IntersectRect
(
&
rc
,
&
rc
,
rect
))
add_bounds_rect
(
&
dev
->
bounds
,
&
rc
);
if
(
IntersectRect
(
&
rc
,
&
rc
,
rect
))
add_bounds_rect
(
dev
->
bounds
,
&
rc
);
}
else
add_bounds_rect
(
&
dev
->
bounds
,
rect
);
else
add_bounds_rect
(
dev
->
bounds
,
rect
);
}
/***********************************************************************
* dibdrv_GetBoundsRect
*/
static
UINT
X11DRV_GetBoundsRect
(
PHYSDEV
dev
,
RECT
*
rect
,
UINT
flags
)
{
X11DRV_PDEVICE
*
pdev
=
get_x11drv_dev
(
dev
);
if
(
IsRectEmpty
(
&
pdev
->
bounds
))
return
DCB_RESET
;
if
(
rect
)
*
rect
=
pdev
->
bounds
;
if
(
flags
&
DCB_RESET
)
reset_bounds
(
&
pdev
->
bounds
);
return
DCB_SET
;
}
/***********************************************************************
* X11DRV_SetBoundsRect
*/
static
UINT
X11DRV_SetBoundsRect
(
PHYSDEV
dev
,
RECT
*
rect
,
UINT
flags
)
{
X11DRV_PDEVICE
*
pdev
=
get_x11drv_dev
(
dev
);
if
(
IsRectEmpty
(
&
pdev
->
bounds
))
return
DCB_RESET
;
if
(
flags
&
DCB_RESET
)
reset_bounds
(
&
pdev
->
bounds
)
;
return
DCB_
SET
;
if
(
flags
&
DCB_DISABLE
)
pdev
->
bounds
=
NULL
;
else
if
(
flags
&
DCB_ENABLE
)
pdev
->
bounds
=
rect
;
return
DCB_
RESET
;
/* we don't have device-specific bounds */
}
...
...
@@ -516,7 +502,7 @@ static const struct gdi_dc_funcs x11drv_funcs =
NULL
,
/* pFrameRgn */
NULL
,
/* pGdiComment */
NULL
,
/* pGdiRealizationInfo */
X11DRV_GetBoundsRect
,
/* pGetBoundsRect */
NULL
,
/* pGetBoundsRect */
NULL
,
/* pGetCharABCWidths */
NULL
,
/* pGetCharABCWidthsI */
NULL
,
/* pGetCharWidth */
...
...
dlls/winex11.drv/x11drv.h
View file @
bc6f2f86
...
...
@@ -123,7 +123,7 @@ typedef struct
Drawable
drawable
;
RECT
dc_rect
;
/* DC rectangle relative to drawable */
RECT
drawable_rect
;
/* Drawable rectangle relative to screen */
RECT
bounds
;
/* Graphics bounds */
RECT
*
bounds
;
/* Graphics bounds */
HRGN
region
;
/* Device region (visible region & clip region) */
X_PHYSPEN
pen
;
X_PHYSBRUSH
brush
;
...
...
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