Closed xadaemon closed 3 years ago
after adding some debug printf's the window seems to be requesting the events all right but not acting upon them (I will continue the tests on my end here)
it seems that there is something up with the buffer read or the write because upon dumping the bytes read from the ringbuff also the buffer is not being advanced on write, very strange
it seems I figured out typing events however something is up with clicks they seems to register only when the mouse is moved and register duplicate
Great catch on that for loop! I was just looking at this, it was a puzzling bug for sure. r_pos
will still have to be updated in case of overflow, is that calculation causing issues too (the one commented out) ?
I don't know if that fixes click issues specifically, but you should replace |=
assignments with plain =
, otherwise you're or
ing a flag with some random value from the stack.
Edit: couldn't tell you how, but I managed to type a smiley character by moving the mouse around (or
-related probably) ^^ Also, the repeat events lead to really cool visuals in paint!
I removed all instances of |=
, ok so I figured a few things I will change ringbuffer around a bit and see if that helps
@29jm I managed to sort out the bug and make the ringbuffer simpler, last problem is that for some reason the moment you focus back on the terminal(say if you were using calc) it prints out a garbage character
I'm not losing keystrokes with as low as a 5 items ring buffer can you do some tests too?
@29jm I managed to fix every issue now should be all good for merging
@29jm there goes the pr, in my tests chaging the ringbuffer size at wm.c:70 seems to not make much of a difference and the events are happening there is just this odd delay it seems