Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Main
Synchronet
Commits
11d392f5
Commit
11d392f5
authored
May 07, 2020
by
deuce
Browse files
Allow scrollwheel to go into/out of scrollback mode when connected.
parent
47a5ca24
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
2 deletions
+20
-2
src/syncterm/menu.c
src/syncterm/menu.c
+10
-0
src/syncterm/term.c
src/syncterm/term.c
+10
-2
No files found.
src/syncterm/menu.c
View file @
11d392f5
...
...
@@ -46,6 +46,8 @@ void viewscroll(void)
set_modepalette
(
palettes
[
COLOUR_PALETTE
]);
gotoxy
(
1
,
1
);
textattr
(
uifc
.
hclr
|
(
uifc
.
bclr
<<
4
)
|
BLINK
);
ciomouse_addevent
(
CIOLIB_BUTTON_4_PRESS
);
ciomouse_addevent
(
CIOLIB_BUTTON_5_PRESS
);
for
(
i
=
0
;(
!
i
)
&&
(
!
quitting
);)
{
if
(
top
<
1
)
top
=
1
;
...
...
@@ -70,6 +72,14 @@ void viewscroll(void)
case
CIOLIB_BUTTON_1_DRAG_START
:
mousedrag
(
scrollback
);
break
;
case
CIOLIB_BUTTON_4_PRESS
:
top
--
;
break
;
case
CIOLIB_BUTTON_5_PRESS
:
top
++
;
if
(
top
>
cterm
->
backpos
)
i
=
1
;
break
;
}
break
;
case
CIO_KEY_UP
:
...
...
src/syncterm/term.c
View file @
11d392f5
...
...
@@ -138,6 +138,7 @@ void setup_mouse_events(struct mouse_state *ms)
ciomouse_addevent
(
CIOLIB_BUTTON_1_DRAG_END
);
ciomouse_addevent
(
CIOLIB_BUTTON_2_CLICK
);
ciomouse_addevent
(
CIOLIB_BUTTON_3_CLICK
);
ciomouse_addevent
(
CIOLIB_BUTTON_4_PRESS
);
}
#if defined(__BORLANDC__)
...
...
@@ -2653,12 +2654,19 @@ BOOL doterm(struct bbslist *bbs)
case
CIOLIB_BUTTON_2_RELEASE
:
case
CIOLIB_BUTTON_3_PRESS
:
case
CIOLIB_BUTTON_3_RELEASE
:
case
CIOLIB_BUTTON_4_PRESS
:
case
CIOLIB_BUTTON_5_PRESS
:
case
CIOLIB_MOUSE_MOVE
:
case
CIOLIB_BUTTON_1_CLICK
:
conn_send
(
mouse_buf
,
fill_mevent
(
mouse_buf
,
sizeof
(
mouse_buf
),
&
mevent
,
&
ms
),
0
);
break
;
case
CIOLIB_BUTTON_4_PRESS
:
case
CIOLIB_BUTTON_5_PRESS
:
if
(
ms
.
mode
!=
9
&&
ms
.
mode
!=
0
)
{
conn_send
(
mouse_buf
,
fill_mevent
(
mouse_buf
,
sizeof
(
mouse_buf
),
&
mevent
,
&
ms
),
0
);
break
;
}
viewscroll
();
setup_mouse_events
(
&
ms
);
break
;
case
CIOLIB_BUTTON_1_DRAG_START
:
mousedrag
(
scrollback_buf
);
break
;
...
...
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