aboutsummaryrefslogtreecommitdiff
path: root/src/connect.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/connect.c')
-rw-r--r--src/connect.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/connect.c b/src/connect.c
index 71552da..f6c439b 100644
--- a/src/connect.c
+++ b/src/connect.c
@@ -93,20 +93,24 @@ static void button_action(State *state, const char *event, int x, int y)
layout->x, layout->y, layout->width, layout->height);
if (in_capsule(x, y, layout->x, layout->y, layout->width, layout->height)) {
- log_debug("Triggering action for button");
- ButtonAction action = button_simple_get_action(layout->btn);
+ Button *btn = layout->btn;
+ ButtonAction action = button_simple_get_action(btn);
+
+ // TODO: Button labels
+ log_debug("Triggering action for button [button=%p]", btn);
if (action != NULL) {
- Animation *shine = animation_shine_create(300 * G_TIME_SPAN_MILLISECOND);
+ // NOTE: Animations may change layout!
+ //Animation *anim = animation_shine_create(300 * G_TIME_SPAN_MILLISECOND);
+ Animation *anim = animation_pulse_create(1000 * G_TIME_SPAN_MILLISECOND);
- if (button_set_animation(layout->btn, shine))
+ if (button_set_animation(btn, anim))
state_request_animation(state);
else
- animation_destroy(shine);
+ animation_destroy(anim);
- action(layout->btn);
+ action(btn);
}
-
return;
}
} else {