mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:57:44 +00:00
SoundPlayer: Activate window only on file drop
This commit is contained in:
parent
e7fbd48ed9
commit
d7f0472b25
1 changed files with 1 additions and 1 deletions
|
@ -226,12 +226,12 @@ void SoundPlayerWidgetAdvancedView::set_nonlinear_volume_slider(bool nonlinear)
|
||||||
void SoundPlayerWidgetAdvancedView::drop_event(GUI::DropEvent& event)
|
void SoundPlayerWidgetAdvancedView::drop_event(GUI::DropEvent& event)
|
||||||
{
|
{
|
||||||
event.accept();
|
event.accept();
|
||||||
window()->move_to_front();
|
|
||||||
|
|
||||||
if (event.mime_data().has_urls()) {
|
if (event.mime_data().has_urls()) {
|
||||||
auto urls = event.mime_data().urls();
|
auto urls = event.mime_data().urls();
|
||||||
if (urls.is_empty())
|
if (urls.is_empty())
|
||||||
return;
|
return;
|
||||||
|
window()->move_to_front();
|
||||||
open_file(urls.first().path());
|
open_file(urls.first().path());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue