59
62
kpe = (xcb_key_press_event_t *)ev;
61
64
if (_xvd_keys_is_symbol(kpe->detail, Inst->keyRaise)) {
62
xvd_mixer_change_volume (Inst, Inst->vol_step);
65
if (xvd_mixer_change_volume (Inst, Inst->vol_step)) {
67
/* if (!Inst->muted) {*/
65
68
if (Inst->current_vol == 100)
66
69
xvd_notify_overshoot_notification (Inst);
68
71
xvd_notify_volume_notification (Inst);
73
77
else if (_xvd_keys_is_symbol(kpe->detail, Inst->keyLower)) {
74
xvd_mixer_change_volume (Inst, (Inst->vol_step * -1));
78
if (xvd_mixer_change_volume (Inst, (Inst->vol_step * -1))) {
80
/* if (!Inst->muted) {*/
77
81
if (Inst->current_vol == 0)
78
82
xvd_notify_undershoot_notification (Inst);
80
84
xvd_notify_volume_notification (Inst);
85
90
else if (_xvd_keys_is_symbol(kpe->detail, Inst->keyMute)) {
86
xvd_mixer_toggle_mute (Inst);
89
xvd_notify_notification (Inst, "notification-audio-volume-muted", 0);
91
xvd_mixer_init_volume (Inst);
92
xvd_notify_volume_notification (Inst);
91
if (xvd_mixer_toggle_mute (Inst)) {
94
xvd_notify_notification (Inst, "notification-audio-volume-muted", 0);
96
xvd_mixer_init_volume (Inst);
97
xvd_notify_volume_notification (Inst);
217
223
xvd_keys_release (XvdInstance *Inst)
219
xcb_key_symbols_free (Inst->kss);
220
225
g_free (Inst->keyRaise);
221
226
g_free (Inst->keyLower);
222
227
g_free (Inst->keyMute);
223
xcb_disconnect (Inst->conn);
229
xcb_key_symbols_free (Inst->kss);
231
xcb_disconnect (Inst->conn);