diff options
| author | Nathan Reiner <nathan@nathanreiner.xyz> | 2023-04-24 11:37:22 +0200 |
|---|---|---|
| committer | Nathan Reiner <nathan@nathanreiner.xyz> | 2023-04-24 11:37:22 +0200 |
| commit | feb5adefd9d4909aa30d3a49e173a8954b755de2 (patch) | |
| tree | 8e457891824d08386f24eee6e3915f3a8b28d0ee /swt.c | |
| parent | 67893dc14d10f49a76652ff384ab2bf4a945ca30 (diff) | |
fix fontcache, free glyph after drawing if not cached
Diffstat (limited to 'swt.c')
| -rw-r--r-- | swt.c | 16 |
1 files changed, 11 insertions, 5 deletions
@@ -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); } |