mirror of
https://github.com/dankamongmen/notcurses
synced 2025-03-09 17:19:03 -04:00
report pixel mice capabilities in notcurses-info #2326
This commit is contained in:
parent
76afcbd8ed
commit
6b461c89cf
@ -79,7 +79,8 @@ The next five lines describe properties of the terminal environment:
|
||||
|
||||
* The fourth line indicates the default background color, and whether that
|
||||
color is treated as transparent by the terminal (only **kitty** is known
|
||||
to do this), and the default foreground color.
|
||||
to do this), and the default foreground color. **pmouse** indicates
|
||||
whether pixel-precise mouse events are supported.
|
||||
|
||||
* The fifth line describes the available bitmap graphics. If Sixels are
|
||||
available, the maximum number of color registers and maximum Sixel
|
||||
|
@ -383,6 +383,7 @@ tinfo_debug_bitmaps(struct ncplane* n, const tinfo* ti, const char* indent){
|
||||
}else{
|
||||
ncplane_printf(n, "default bg 0x%06x", bg);
|
||||
}
|
||||
tinfo_debug_cap(n, " pmouse", ti->pixelmice);
|
||||
finish_line(n);
|
||||
ncpixelimpl_e blit = notcurses_check_pixel_support(ncplane_notcurses(n));
|
||||
switch(blit){
|
||||
|
@ -1148,6 +1148,8 @@ da1_attrs_cb(inputctx* ictx){
|
||||
}
|
||||
}else if(curattr == 28){
|
||||
ictx->initdata->rectangular_edits = true;
|
||||
}else if(curattr == 29){
|
||||
ictx->initdata->pixelmice = true;
|
||||
}
|
||||
if(!foundsixel){
|
||||
scrub_sixel_responses(ictx->initdata);
|
||||
|
@ -81,6 +81,7 @@ struct initial_responses {
|
||||
unsigned kbdlevel; // enabled kitty keyboard functions
|
||||
ncpalette palette; // palette entries
|
||||
int maxpaletteread; // maximum palette index read
|
||||
bool pixelmice; // have we pixel-based mice events?
|
||||
};
|
||||
|
||||
// Blocking call. Waits until the input thread has processed all responses to
|
||||
|
@ -1346,6 +1346,7 @@ int interrogate_terminfo(tinfo* ti, FILE* out, unsigned utf8,
|
||||
ti->sixel_maxy = iresp->sixely;
|
||||
ti->sixel_maxx = iresp->sixelx;
|
||||
}
|
||||
ti->pixelmice = iresp->pixelmice;
|
||||
if(iresp->rectangular_edits){
|
||||
if(grow_esc_table(ti, "\x1b[%p1%d;%p2%d;%p3%d;$z", ESCAPE_DECERA, &tablelen, &tableused)){
|
||||
goto err;
|
||||
|
@ -192,6 +192,7 @@ typedef struct tinfo {
|
||||
pthread_t gpmthread; // thread handle for GPM watcher
|
||||
int gpmfd; // connection to GPM daemon
|
||||
char mouseproto; // DECSET level (100x, '0', '2', '3')
|
||||
bool pixelmice; // we support pixel-accuracy for mice
|
||||
#ifdef __linux__
|
||||
int linux_fb_fd; // linux framebuffer device fd
|
||||
char* linux_fb_dev; // device corresponding to linux_fb_dev
|
||||
|
Loading…
x
Reference in New Issue
Block a user