feedback-manager: Don't trigger haptic feedbacks when vibra is busy
This just gives odd vibration. Later on we should use priorities to allow for higher priority events like phone calls to override lower priority events like e.g. button presses. This is similar to how we want to handle LED patterns. Signed-off-by: Guido Günther <agx@sigxcpu.org>
This commit is contained in:
1 parent
cdf5fb2b2d
commit
5ed445a81d
1 file changed
+4
@@ -414,6 +414,10 @@ fbd_feedback_manager_handle_trigger_feedback (LfbGdbusFeedback *object,
|
||||
FbdFeedbackBase *fb = FBD_FEEDBACK_BASE (l->data);
|
||||
|
||||
if (fbd_feedback_is_available (FBD_FEEDBACK_BASE (fb))) {
|
||||
/* Handle one haptic feedback at a time */
|
||||
/* TODO: should use priorities */
|
||||
if (FBD_IS_FEEDBACK_VIBRA (fb) && fbd_dev_vibra_is_busy (self->vibra))
|
||||
continue;
|
||||
fbd_event_add_feedback (event, fb);
|
||||
found_fb = TRUE;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user