diary

Text-based journaling program
git clone https://git.in0rdr.ch/diary.git
Log | Files | Refs | README | LICENSE

commit 1e4a3a02d618cb871dcd853cf9919bf21746f4a2
parent 2386cd37d14bca199fefaed9994236f50a2c8f8e
Author: Andreas Gruhler <agruhl@gmx.ch>
Date:   Sun, 28 Nov 2021 13:01:54 +0100

comment

Diffstat:
Msrc/diary.c | 7++-----
1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/src/diary.c b/src/diary.c @@ -607,7 +607,6 @@ int main(int argc, char** argv) { mmask_t oldmask; mousemask(ALL_MOUSE_EVENTS, &oldmask); MEVENT event; - bool click_in_calwin = false; do { ch = wgetch(cal); @@ -692,10 +691,8 @@ int main(int argc, char** argv) { // jump to specific date using the mouse case KEY_MOUSE: if(getmouse(&event) == OK) { - // when left mouse button pressed - fprintf(stderr, "Button event: %i\n", event.bstate); - click_in_calwin = wenclose(cal, event.y, event.x); - if (click_in_calwin) { + // fprintf(stderr, "Button event: %i\n", event.bstate); + if (wenclose(cal, event.y, event.x)) { if(event.bstate & (BUTTON1_PRESSED|BUTTON1_CLICKED)) { // regular left-mouse button click or tap on a touchpad: // BUTTON1_PRESSED detects touch events (touch pads)