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: https://github.com/SerenityOS/serenity/commit/e7fbd48ed9b 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
Reference in a new issue