gui/timeline.c click event

This commit is contained in:
Cedric Roux
2016-05-19 16:00:10 +02:00
parent 5c5f54709c
commit e4fd229641
2 changed files with 5 additions and 0 deletions
+1
View File
@@ -88,6 +88,7 @@ int new_color(gui *gui, char *color);
* - resize { int: width }
* - scrollup { int [3]: x, y, key_modifiers }
* - scrolldown { int [3]: x, y, key_modifiers }
* - click { int: button }
*/
/* same type as in gui_defs.h */
+4
View File
@@ -74,6 +74,10 @@ static void button(gui *_g, widget *_this, int x, int y,
d[2] = key_modifiers;
gui_notify(g, "scrolldown", _this, d);
}
/* button 1/2/3 */
if ((button == 1 || button == 2 || button == 3) && up == 0) {
gui_notify(g, "click", _this, &button);
}
}
/*************************************************************************/