mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-09 17:44:56 +09:00
ImageViewer: Activate window only on file drop
This commit is contained in:
parent
7f418a5c6a
commit
e7fbd48ed9
Notes:
sideshowbarker
2024-07-19 17:25:58 +09:00
Author: https://github.com/krkk
Commit: e7fbd48ed9
Pull-request: https://github.com/SerenityOS/serenity/pull/8693
Reviewed-by: https://github.com/gunnarbeutner ✅
1 changed files with 1 additions and 2 deletions
|
@ -100,8 +100,6 @@ int main(int argc, char** argv)
|
|||
}
|
||||
};
|
||||
widget.on_drop = [&](auto& event) {
|
||||
window->move_to_front();
|
||||
|
||||
if (!event.mime_data().has_urls())
|
||||
return;
|
||||
|
||||
|
@ -110,6 +108,7 @@ int main(int argc, char** argv)
|
|||
if (urls.is_empty())
|
||||
return;
|
||||
|
||||
window->move_to_front();
|
||||
widget.load_from_file(urls.first().path());
|
||||
|
||||
for (size_t i = 1; i < urls.size(); ++i) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue