Skip to content

Commit

Permalink
volume: hide popover after scrolling
Browse files Browse the repository at this point in the history
  • Loading branch information
NamorNiradnug committed Aug 5, 2023
1 parent 11bab7a commit 827c268
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/panel/widgets/volume.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@ void WayfireVolume::on_volume_scroll(GdkEventScroll *event)
int32_t current_volume = volume_scale.get_target_value();
const int32_t adjustment_step = max_norm * INCREMENT_STEP_PC;

button->set_keyboard_interactive(false);

/* Adjust volume on button scroll */
if ((event->direction == GDK_SCROLL_UP) ||
((event->direction == GDK_SCROLL_SMOOTH) && (event->delta_y < 0)))
Expand All @@ -151,7 +153,7 @@ void WayfireVolume::on_volume_scroll(GdkEventScroll *event)
set_volume(std::max(current_volume - adjustment_step, 0));
}

button->grab_focus();
button->set_keyboard_interactive();
check_set_popover_timeout();
}

Expand Down

0 comments on commit 827c268

Please sign in to comment.