ref: 412ccf577fc5e78f0bf8998969ad531d2bb55608
parent: 0ad2ce4d7d26e35544b99897d22a28dc915cacd8
author: Sigrid Haflínudóttir <ftrvxmtrx@gmail.com>
date: Thu Aug 13 05:09:16 EDT 2020
make the area around seek bar not do anything when clicked
--- a/zuke.c
+++ b/zuke.c
@@ -939,10 +939,12 @@
n = (m.xy.y - screen->r.min.y)/f->height;
- if(oldbuttons == 0 && !scrolling && ptinrect(m.xy, seekbar)){
+ if(oldbuttons == 0 && !scrolling && ptinrect(m.xy, insetrect(seekbar, -3))){
m.xy.x--;
- double off = getmeta(pcurplaying)->duration * (double)(m.xy.x-seekbar.min.x) / (double)Dx(seekbar);
- seekrel(playercurr, off/1000.0 - byteswritten/Bps);
+ if(ptinrect(m.xy, seekbar)){
+ double off = getmeta(pcurplaying)->duration * (double)(m.xy.x-seekbar.min.x) / (double)Dx(seekbar);
+ seekrel(playercurr, off/1000.0 - byteswritten/Bps);
+ }
break;
}
if(oldbuttons == 0 && m.xy.x <= screen->r.min.x+Scrollwidth){