shithub: widget

Download patch

ref: 5549503afffbd360061e5a36d3488e3fb101f504
parent: 5b7bb5370a455e3a61d16ea71c2fe69cfeb051e3
author: Tevo <estevan.cps@gmail.com>
date: Sat Jul 3 17:04:23 EDT 2021

Silly button bug fix

--- a/libwidget/base.c
+++ b/libwidget/base.c
@@ -63,12 +63,6 @@
 		switch(alt(chans))
 		{
 		case MOUSE:
-			/* 
-			 * FIXME if the user clicks once, the widget handles it, then
-			 * the user drags and the widget claims to not have handled it
-			 * a menu will be shown for that button (if there's one), but 
-			 * it probably shouldn't
-			 */
 			if(!mouseevent(ctl->root, ctl->image, ctl->image->r, mouse, ctl->c))
 			{
 				if((mouse.buttons & M_LEFT) && ctl->left != nil)
--- a/libwidget/button.c
+++ b/libwidget/button.c
@@ -57,7 +57,7 @@
 		return 1;
 	}
 
-	return 0;
+	return m.buttons & 1;
 }
 
 void