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
ca47818c
Commit
ca47818c
authored
Mar 22, 2021
by
Huw Davies
Committed by
Alexandre Julliard
Mar 22, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20: Fix-up the scrollbar visibility in the host.
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b406377d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
22 deletions
+20
-22
paint.c
dlls/riched20/paint.c
+2
-22
txthost.c
dlls/riched20/txthost.c
+18
-0
No files found.
dlls/riched20/paint.c
View file @
ca47818c
...
...
@@ -1057,7 +1057,6 @@ static void set_scroll_range_pos( ITextHost *host, INT bar, SCROLLINFO *info, BO
void
ME_ScrollAbs
(
ME_TextEditor
*
editor
,
int
x
,
int
y
)
{
BOOL
old_vis
,
new_vis
;
int
scrollX
=
0
,
scrollY
=
0
;
if
(
editor
->
horz_si
.
nPos
!=
x
)
{
...
...
@@ -1076,33 +1075,14 @@ void ME_ScrollAbs(ME_TextEditor *editor, int x, int y)
set_scroll_range_pos
(
editor
->
texthost
,
SB_VERT
,
&
editor
->
vert_si
,
FALSE
);
}
if
(
abs
(
scrollX
)
>
editor
->
sizeWindow
.
cx
||
abs
(
scrollY
)
>
editor
->
sizeWindow
.
cy
)
if
(
abs
(
scrollX
)
>
editor
->
sizeWindow
.
cx
||
abs
(
scrollY
)
>
editor
->
sizeWindow
.
cy
)
ITextHost_TxInvalidateRect
(
editor
->
texthost
,
NULL
,
TRUE
);
else
ITextHost_TxScrollWindowEx
(
editor
->
texthost
,
scrollX
,
scrollY
,
&
editor
->
rcFormat
,
&
editor
->
rcFormat
,
NULL
,
NULL
,
SW_INVALIDATE
);
ME_Repaint
(
editor
);
if
(
editor
->
hWnd
)
{
LONG
winStyle
=
GetWindowLongW
(
editor
->
hWnd
,
GWL_STYLE
);
if
(
editor
->
scrollbars
&
WS_HSCROLL
)
{
old_vis
=
winStyle
&
WS_HSCROLL
;
new_vis
=
editor
->
horz_sb_enabled
||
editor
->
scrollbars
&
ES_DISABLENOSCROLL
;
if
(
!
old_vis
^
!
new_vis
)
ITextHost_TxShowScrollBar
(
editor
->
texthost
,
SB_HORZ
,
new_vis
);
}
if
(
editor
->
scrollbars
&
WS_VSCROLL
)
{
old_vis
=
winStyle
&
WS_VSCROLL
;
new_vis
=
editor
->
vert_sb_enabled
||
editor
->
scrollbars
&
ES_DISABLENOSCROLL
;
if
(
!
old_vis
^
!
new_vis
)
ITextHost_TxShowScrollBar
(
editor
->
texthost
,
SB_VERT
,
new_vis
);
}
}
ME_UpdateScrollBar
(
editor
);
ME_Repaint
(
editor
);
}
void
ME_HScrollAbs
(
ME_TextEditor
*
editor
,
int
x
)
...
...
dlls/riched20/txthost.c
View file @
ca47818c
...
...
@@ -222,6 +222,24 @@ DEFINE_THISCALL_WRAPPER(ITextHostImpl_TxSetScrollPos,16)
DECLSPEC_HIDDEN
BOOL
__thiscall
ITextHostImpl_TxSetScrollPos
(
ITextHost
*
iface
,
INT
bar
,
INT
pos
,
BOOL
redraw
)
{
struct
host
*
host
=
impl_from_ITextHost
(
iface
);
DWORD
style
=
GetWindowLongW
(
host
->
window
,
GWL_STYLE
);
DWORD
mask
=
(
bar
==
SB_HORZ
)
?
WS_HSCROLL
:
WS_VSCROLL
;
BOOL
show
=
TRUE
,
shown
=
style
&
mask
;
if
(
bar
!=
SB_HORZ
&&
bar
!=
SB_VERT
)
{
FIXME
(
"Unexpected bar %d
\n
"
,
bar
);
return
FALSE
;
}
/* If the application has adjusted the scrollbar's visibility it is reset */
if
(
!
(
host
->
scrollbars
&
ES_DISABLENOSCROLL
))
{
if
(
bar
==
SB_HORZ
)
ITextServices_TxGetHScroll
(
host
->
text_srv
,
NULL
,
NULL
,
NULL
,
NULL
,
&
show
);
else
ITextServices_TxGetVScroll
(
host
->
text_srv
,
NULL
,
NULL
,
NULL
,
NULL
,
&
show
);
}
if
(
!
show
^
!
shown
)
ShowScrollBar
(
host
->
window
,
bar
,
show
);
return
SetScrollPos
(
host
->
window
,
bar
,
pos
,
redraw
)
!=
0
;
}
...
...
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