From feb5adefd9d4909aa30d3a49e173a8954b755de2 Mon Sep 17 00:00:00 2001 From: Nathan Reiner Date: Mon, 24 Apr 2023 11:37:22 +0200 Subject: fix fontcache, free glyph after drawing if not cached --- swt.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'swt.c') diff --git a/swt.c b/swt.c index 42ff22e..9c26650 100644 --- a/swt.c +++ b/swt.c @@ -784,11 +784,15 @@ pointer_button(void *data, struct wl_pointer *pointer, uint32_t serial, uint32_t client.pointer.buttons.tclick = time; ++client.pointer.buttons.click_combo; - selstart( - MIN(wintotty(client.pointer.position.x, width), win.tty.width - 1), - MIN(wintotty(client.pointer.position.y, height), win.tty.height - 1), - snap - ); + if (IS_SET(MODE_MOUSE) | IS_SET(MODE_MOUSEMANY) | IS_SET(MODE_MOUSEBTN)) { + ttywrite("\031", 1, 1); + } else { + selstart( + MIN(wintotty(client.pointer.position.x, width), win.tty.width - 1), + MIN(wintotty(client.pointer.position.y, height), win.tty.height - 1), + snap + ); + } win.redraw = 1; } else if (button == BTN_LEFT && !state) { client.pointer.buttons.button &= ~BTN_LEFT; @@ -805,6 +809,8 @@ pointer_button(void *data, struct wl_pointer *pointer, uint32_t serial, uint32_t void pointer_axis(void *data, struct wl_pointer *pointer, uint32_t time, uint32_t axis, wl_fixed_t value) { + int v = wl_fixed_to_int(value); + fprintf(stderr, "scroll: a: %i, v: %i\n", axis, v); } -- cgit v1.2.3-70-g09d2