Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Main
Synchronet
Commits
268d7448
Commit
268d7448
authored
5 years ago
by
deuce
Browse files
Options
Downloads
Patches
Plain Diff
Fix mouse in curses mode.
parent
5d6d3d50
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/conio/curs_cio.c
+8
-3
8 additions, 3 deletions
src/conio/curs_cio.c
with
8 additions
and
3 deletions
src/conio/curs_cio.c
+
8
−
3
View file @
268d7448
...
...
@@ -56,6 +56,7 @@ static int lastattr=0;
static
long
mode
;
static
int
vflags
=
0
;
static
int
suspended
=
0
;
static
int
mpress
=
0
;
void
curs_resume
(
void
);
static
short
curses_color
(
short
color
)
...
...
@@ -646,8 +647,10 @@ int curs_kbhit(void)
if
(
curs_nextgetch
)
return
(
1
);
if
(
mouse_trywait
())
if
(
mpress
||
mouse_trywait
())
{
mpress
=
1
;
return
(
1
);
}
timeout
.
tv_sec
=
0
;
timeout
.
tv_usec
=
0
;
FD_ZERO
(
&
rfds
);
...
...
@@ -747,8 +750,9 @@ int curs_initciolib(long inmode)
mouseinterval
(
0
);
cio_api
.
mouse
=
1
;
}
else
else
{
mousemask
(
0
,
NULL
);
}
#endif
if
(
COLORS
>=
16
)
...
...
@@ -791,7 +795,8 @@ int curs_getch(void)
else
{
curs_resume
();
while
((
ch
=
getch
())
==
ERR
)
{
if
(
mouse_trywait
())
{
if
(
mpress
||
mouse_trywait
())
{
mpress
=
0
;
curs_nextgetch
=
CIO_KEY_MOUSE
>>
8
;
return
(
CIO_KEY_MOUSE
&
0xff
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment