summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authorKarol Kosek <krkk@krkk.ct8.pl>2021-07-12 17:58:33 +0200
committerGunnar Beutner <gunnar@beutner.name>2021-07-12 20:02:15 +0200
commite7fbd48ed9b1eff52b17bff46db524849373dc65 (patch)
treea360bc3fc95d57fe2c6dd1a472d8cf5fb8377bcc /Userland
parent7f418a5c6a21c35767ed10cbf0b701272f33a350 (diff)
downloadserenity-e7fbd48ed9b1eff52b17bff46db524849373dc65.zip
ImageViewer: Activate window only on file drop
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Applications/ImageViewer/main.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/Userland/Applications/ImageViewer/main.cpp b/Userland/Applications/ImageViewer/main.cpp
index 9633e2a6e0..23a8437de8 100644
--- a/Userland/Applications/ImageViewer/main.cpp
+++ b/Userland/Applications/ImageViewer/main.cpp
@@ -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) {