mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-01 03:57:15 +02:00
SoundPlayer: Activate window only on file drop
This commit is contained in:
committed by
Gunnar Beutner
parent
e7fbd48ed9
commit
d7f0472b25
Notes:
sideshowbarker
2024-07-19 17:25:52 +09:00
Author: https://github.com/krkk Commit: https://github.com/SerenityOS/serenity/commit/d7f0472b256 Pull-request: https://github.com/SerenityOS/serenity/pull/8693 Reviewed-by: https://github.com/gunnarbeutner ✅
@@ -226,12 +226,12 @@ void SoundPlayerWidgetAdvancedView::set_nonlinear_volume_slider(bool nonlinear)
|
||||
void SoundPlayerWidgetAdvancedView::drop_event(GUI::DropEvent& event)
|
||||
{
|
||||
event.accept();
|
||||
window()->move_to_front();
|
||||
|
||||
if (event.mime_data().has_urls()) {
|
||||
auto urls = event.mime_data().urls();
|
||||
if (urls.is_empty())
|
||||
return;
|
||||
window()->move_to_front();
|
||||
open_file(urls.first().path());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user