mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:27:43 +00:00
ImageViewer: Activate window only on file drop
This commit is contained in:
parent
7f418a5c6a
commit
e7fbd48ed9
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