diff options
| author | Louis Burda <quent.burda@gmail.com> | 2024-08-11 21:05:19 +0200 |
|---|---|---|
| committer | Louis Burda <quent.burda@gmail.com> | 2024-08-11 21:05:19 +0200 |
| commit | 1696179a664286697fb010e58283cacf8d3b3866 (patch) | |
| tree | 084af092c934d1f78dba260693cfc845268c62ba | |
| parent | 79e3974d34994261fd2239575fd6661bcce28b0e (diff) | |
| download | xnote-1696179a664286697fb010e58283cacf8d3b3866.tar.gz xnote-1696179a664286697fb010e58283cacf8d3b3866.zip | |
Add new note after mouse move
| -rw-r--r-- | xnote.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -30,6 +30,7 @@ enum event { EVENT_START_LINE, EVENT_END_LINE, EVENT_START_NOTE, + EVENT_MOUSE_MOVE, }; static struct line *lines = NULL; @@ -173,6 +174,8 @@ mouse_move_cb(GLFWwindow *window, double x, double y) &line->count, &line->cap, sizeof(struct point)); point->x = cursor_x; point->y = cursor_y; + } else if (last_event() != EVENT_MOUSE_MOVE) { + push_event(EVENT_MOUSE_MOVE); } } |
