diff options
-rw-r--r-- | Userland/Applications/SoundPlayer/BarsVisualizationWidget.cpp | 7 | ||||
-rw-r--r-- | Userland/Applications/SoundPlayer/BarsVisualizationWidget.h | 2 |
2 files changed, 3 insertions, 6 deletions
diff --git a/Userland/Applications/SoundPlayer/BarsVisualizationWidget.cpp b/Userland/Applications/SoundPlayer/BarsVisualizationWidget.cpp index c700611e3b..a52eb5e8de 100644 --- a/Userland/Applications/SoundPlayer/BarsVisualizationWidget.cpp +++ b/Userland/Applications/SoundPlayer/BarsVisualizationWidget.cpp @@ -117,12 +117,9 @@ void BarsVisualizationWidget::set_buffer(RefPtr<Audio::Buffer> buffer) set_buffer(buffer, buffer->sample_count()); } -void BarsVisualizationWidget::mousedown_event(GUI::MouseEvent& event) +void BarsVisualizationWidget::context_menu_event(GUI::ContextMenuEvent& event) { - Widget::mousedown_event(event); - if (event.button() == GUI::Right) { - m_context_menu->popup(event.position()); - } + m_context_menu->popup(event.screen_position()); } void BarsVisualizationWidget::set_samplerate(int samplerate) diff --git a/Userland/Applications/SoundPlayer/BarsVisualizationWidget.h b/Userland/Applications/SoundPlayer/BarsVisualizationWidget.h index 54d3778e6c..679928e60c 100644 --- a/Userland/Applications/SoundPlayer/BarsVisualizationWidget.h +++ b/Userland/Applications/SoundPlayer/BarsVisualizationWidget.h @@ -25,7 +25,7 @@ private: void set_buffer(RefPtr<Audio::Buffer> buffer, int samples_to_use); void paint_event(GUI::PaintEvent&) override; - void mousedown_event(GUI::MouseEvent& event) override; + void context_menu_event(GUI::ContextMenuEvent& event) override; Vector<Complex<double>> m_sample_buffer; Vector<int> m_gfx_falling_bars; |