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
861d7c83
Commit
861d7c83
authored
Feb 05, 2002
by
Rein Klazes
Committed by
Alexandre Julliard
Feb 05, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
In X11DRV_ScrollDC only move pixels that are within the clip
rectangle, before and after they are scrolled.
parent
314b9fdd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
19 deletions
+14
-19
scroll.c
dlls/x11drv/scroll.c
+14
-19
No files found.
dlls/x11drv/scroll.c
View file @
861d7c83
...
...
@@ -19,7 +19,7 @@
#include "win.h"
#include "debugtools.h"
DEFAULT_DEBUG_CHANNEL
(
x11drv
);
DEFAULT_DEBUG_CHANNEL
(
scroll
);
/*************************************************************************
...
...
@@ -63,7 +63,7 @@ static BOOL fix_caret(HWND hWnd, LPRECT lprc, UINT flags)
BOOL
X11DRV_ScrollDC
(
HDC
hdc
,
INT
dx
,
INT
dy
,
const
RECT
*
rc
,
const
RECT
*
clipRect
,
HRGN
hrgnUpdate
,
LPRECT
rcUpdate
)
{
RECT
rect
,
rClip
,
r
Src
;
RECT
rect
,
rClip
,
r
Dst
;
TRACE
(
"%04x %d,%d hrgnUpdate=%04x rcUpdate = %p
\n
"
,
hdc
,
dx
,
dy
,
hrgnUpdate
,
rcUpdate
);
if
(
clipRect
)
TRACE
(
"cliprc = (%d,%d,%d,%d)
\n
"
,
...
...
@@ -82,16 +82,16 @@ BOOL X11DRV_ScrollDC( HDC hdc, INT dx, INT dy, const RECT *rc,
}
else
rClip
=
rect
;
r
Src
=
rClip
;
OffsetRect
(
&
r
Src
,
-
dx
,
-
dy
);
IntersectRect
(
&
r
Src
,
&
rSrc
,
&
rect
);
r
Dst
=
rClip
;
OffsetRect
(
&
r
Dst
,
dx
,
dy
);
IntersectRect
(
&
r
Dst
,
&
rDst
,
&
rClip
);
if
(
!
IsRectEmpty
(
&
r
Src
))
if
(
!
IsRectEmpty
(
&
r
Dst
))
{
/* copy bits */
if
(
!
BitBlt
(
hdc
,
r
Src
.
left
+
dx
,
rSrc
.
top
+
dy
,
r
Src
.
right
-
rSrc
.
left
,
rSrc
.
bottom
-
rSrc
.
top
,
hdc
,
r
Src
.
left
,
rSrc
.
top
,
SRCCOPY
))
if
(
!
BitBlt
(
hdc
,
r
Dst
.
left
,
rDst
.
top
,
r
Dst
.
right
-
rDst
.
left
,
rDst
.
bottom
-
rDst
.
top
,
hdc
,
r
Dst
.
left
-
dx
,
rDst
.
top
-
dy
,
SRCCOPY
))
return
FALSE
;
}
...
...
@@ -100,22 +100,14 @@ BOOL X11DRV_ScrollDC( HDC hdc, INT dx, INT dy, const RECT *rc,
if
(
hrgnUpdate
||
rcUpdate
)
{
HRGN
hrgn
=
hrgnUpdate
,
hrgn2
;
POINT
pt
;
/* map everything to device coordinates */
pt
.
x
=
rect
.
left
+
dx
;
pt
.
y
=
rect
.
top
+
dy
;
LPtoDP
(
hdc
,
&
pt
,
1
);
LPtoDP
(
hdc
,
(
LPPOINT
)
&
rect
,
2
);
LPtoDP
(
hdc
,
(
LPPOINT
)
&
rClip
,
2
);
dx
=
pt
.
x
-
rect
.
left
;
dy
=
pt
.
y
-
rect
.
top
;
LPtoDP
(
hdc
,
(
LPPOINT
)
&
rDst
,
2
);
hrgn2
=
CreateRectRgnIndirect
(
&
r
ec
t
);
hrgn2
=
CreateRectRgnIndirect
(
&
r
Ds
t
);
if
(
hrgn
)
SetRectRgn
(
hrgn
,
rClip
.
left
,
rClip
.
top
,
rClip
.
right
,
rClip
.
bottom
);
else
hrgn
=
CreateRectRgn
(
rClip
.
left
,
rClip
.
top
,
rClip
.
right
,
rClip
.
bottom
);
CombineRgn
(
hrgn
,
hrgn
,
hrgn2
,
RGN_AND
);
OffsetRgn
(
hrgn2
,
dx
,
dy
);
CombineRgn
(
hrgn
,
hrgn
,
hrgn2
,
RGN_DIFF
);
if
(
rcUpdate
)
...
...
@@ -134,6 +126,9 @@ BOOL X11DRV_ScrollDC( HDC hdc, INT dx, INT dy, const RECT *rc,
/*************************************************************************
* ScrollWindowEx (X11DRV.@)
*
* Note: contrary to what the doc says, pixels that are scrolled from the
* outside of clipRect to the inside are NOT painted.
*/
INT
X11DRV_ScrollWindowEx
(
HWND
hwnd
,
INT
dx
,
INT
dy
,
const
RECT
*
rect
,
const
RECT
*
clipRect
,
...
...
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