mirror of
https://github.com/dankamongmen/notcurses
synced 2025-03-09 17:19:03 -04:00
[brownbag] actually call mouse_{dis/en}able()
This commit is contained in:
parent
2dd1e8812e
commit
087fd083af
2
NEWS.md
2
NEWS.md
@ -2,6 +2,8 @@ This document attempts to list user-visible changes and any major internal
|
||||
rearrangements of Notcurses.
|
||||
|
||||
* 2.3.9 (not yet released)
|
||||
* Fixed two major regressions in 2.3.8: menu highlighting is working once
|
||||
more, as are pointer inputs (mice). Sorry about that!
|
||||
* `notcurses_detected_terminal()` and `ncdirect_detected_terminal()` now
|
||||
both return a heap-allocated string, which will contain the terminal
|
||||
version if Notcurses was able to detect it. This result ought be free()d.
|
||||
|
@ -1152,14 +1152,14 @@ static inline int
|
||||
mouse_enable(FILE* out){
|
||||
return term_emit("\x1b[?" SET_BTN_EVENT_MOUSE ";"
|
||||
/*SET_FOCUS_EVENT_MOUSE ";" */SET_SGR_MODE_MOUSE "h",
|
||||
out, false);
|
||||
out, true);
|
||||
}
|
||||
|
||||
static inline int
|
||||
mouse_disable(FILE* out){
|
||||
return term_emit("\x1b[?" SET_BTN_EVENT_MOUSE ";"
|
||||
/*SET_FOCUS_EVENT_MOUSE ";" */SET_SGR_MODE_MOUSE "l",
|
||||
out, false);
|
||||
out, true);
|
||||
}
|
||||
|
||||
// how many edges need touch a corner for it to be printed?
|
||||
|
@ -2161,7 +2161,8 @@ ncplane* ncplane_above(ncplane* n){
|
||||
}
|
||||
|
||||
int notcurses_mouse_enable(notcurses* n){
|
||||
if(n->ttyfd >= 0){
|
||||
if(mouse_enable(n->ttyfp)){
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@ -2169,7 +2170,8 @@ int notcurses_mouse_enable(notcurses* n){
|
||||
// this seems to work (note difference in suffix, 'l' vs 'h'), but what about
|
||||
// the sequences 1000 etc?
|
||||
int notcurses_mouse_disable(notcurses* n){
|
||||
if(n->ttyfd >= 0){
|
||||
if(mouse_disable(n->ttyfp)){
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user