Update sixdraw.
This commit is contained in:
parent
012bb4ef6f
commit
329479ecdc
|
@ -29,7 +29,6 @@
|
|||
# include "config.h"
|
||||
#endif // HAVE_CONFIG_H
|
||||
|
||||
#include <signal.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
|
@ -140,8 +139,8 @@ get_winsize(struct sixdraw_ctx *ctx)
|
|||
ctx->rows = ws.ws_row;
|
||||
ctx->ch_width = ws.ws_xpixel / ws.ws_col;
|
||||
ctx->ch_height = ws.ws_ypixel / ws.ws_row;
|
||||
ctx->canvas_width = ws.ws_xpixel - ctx->ch_width;
|
||||
ctx->canvas_height = ws.ws_ypixel - ctx->ch_height * 3;
|
||||
ctx->canvas_width = ctx->ch_width * ws.ws_col;
|
||||
ctx->canvas_height = ctx->ch_height * ws.ws_row - ctx->ch_height * 2;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -377,6 +376,7 @@ draw(struct sixdraw_ctx *ctx)
|
|||
while (true) {
|
||||
switch (ctlseqs_read(ctx->reader, ctx->matcher, -1)) {
|
||||
case 2: // CTLSEQS_RESP_SGR_MOUSE
|
||||
// Pixel coordinates start at 1 instead of 0.
|
||||
print_sixel_dot(ctx, result[1].num - 1, result[2].num - 1);
|
||||
break;
|
||||
case CTLSEQS_NOSEQ:
|
||||
|
|
Loading…
Reference in New Issue