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
1333aebe
Commit
1333aebe
authored
Oct 12, 2020
by
Jacek Caban
Committed by
Alexandre Julliard
Oct 12, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
conhost: Import scrolling support from wineconsole.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
a3583f05
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
66 additions
and
0 deletions
+66
-0
window.c
programs/conhost/window.c
+66
-0
No files found.
programs/conhost/window.c
View file @
1333aebe
...
...
@@ -2310,6 +2310,72 @@ static LRESULT WINAPI window_proc( HWND hwnd, UINT msg, WPARAM wparam, LPARAM lp
max
(
HIWORD
(
lparam
)
/
console
->
active
->
font
.
height
,
20
));
break
;
case
WM_HSCROLL
:
{
int
win_width
=
console
->
active
->
win
.
right
-
console
->
active
->
win
.
left
+
1
;
int
x
=
console
->
active
->
win
.
left
;
switch
(
LOWORD
(
wparam
))
{
case
SB_PAGEUP
:
x
-=
8
;
break
;
case
SB_PAGEDOWN
:
x
+=
8
;
break
;
case
SB_LINEUP
:
x
--
;
break
;
case
SB_LINEDOWN
:
x
++
;
break
;
case
SB_THUMBTRACK
:
x
=
HIWORD
(
wparam
);
break
;
default:
break
;
}
x
=
min
(
max
(
x
,
0
),
console
->
active
->
width
-
win_width
);
if
(
x
!=
console
->
active
->
win
.
left
)
{
console
->
active
->
win
.
left
=
x
;
console
->
active
->
win
.
right
=
x
+
win_width
-
1
;
update_window
(
console
);
}
break
;
}
case
WM_MOUSEWHEEL
:
if
(
console
->
active
->
height
<=
console
->
active
->
win
.
bottom
-
console
->
active
->
win
.
top
+
1
)
{
record_mouse_input
(
console
,
get_cell
(
console
,
lparam
),
wparam
,
MOUSE_WHEELED
);
break
;
}
/* else fallthrough */
case
WM_VSCROLL
:
{
int
win_height
=
console
->
active
->
win
.
bottom
-
console
->
active
->
win
.
top
+
1
;
int
y
=
console
->
active
->
win
.
top
;
if
(
msg
==
WM_MOUSEWHEEL
)
{
UINT
scroll_lines
=
3
;
SystemParametersInfoW
(
SPI_GETWHEELSCROLLLINES
,
0
,
&
scroll_lines
,
0
);
scroll_lines
*=
-
GET_WHEEL_DELTA_WPARAM
(
wparam
)
/
WHEEL_DELTA
;
y
+=
scroll_lines
;
}
else
{
switch
(
LOWORD
(
wparam
))
{
case
SB_PAGEUP
:
y
-=
8
;
break
;
case
SB_PAGEDOWN
:
y
+=
8
;
break
;
case
SB_LINEUP
:
y
--
;
break
;
case
SB_LINEDOWN
:
y
++
;
break
;
case
SB_THUMBTRACK
:
y
=
HIWORD
(
wparam
);
break
;
default:
break
;
}
}
y
=
min
(
max
(
y
,
0
),
console
->
active
->
height
-
win_height
);
if
(
y
!=
console
->
active
->
win
.
top
)
{
console
->
active
->
win
.
top
=
y
;
console
->
active
->
win
.
bottom
=
y
+
win_height
-
1
;
update_window
(
console
);
}
break
;
}
case
WM_SYSCOMMAND
:
switch
(
wparam
)
{
...
...
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