summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authorKarol Kosek <krkk@krkk.ct8.pl>2021-07-12 18:06:03 +0200
committerGunnar Beutner <gunnar@beutner.name>2021-07-12 20:02:15 +0200
commitb2daaca5ee1b95067d0a8d810520b0e86fd3611a (patch)
tree9a80430e4e3f0c6586fafd87d6ee6dceec74358b /Userland
parentd7f0472b256e57dfdf69cf7b417c55e133e6c8fe (diff)
downloadserenity-b2daaca5ee1b95067d0a8d810520b0e86fd3611a.zip
HackStudio: Activate window only on file drop
Diffstat (limited to 'Userland')
-rw-r--r--Userland/DevTools/HackStudio/Editor.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/DevTools/HackStudio/Editor.cpp b/Userland/DevTools/HackStudio/Editor.cpp
index 2eeb678bb8..7be4263737 100644
--- a/Userland/DevTools/HackStudio/Editor.cpp
+++ b/Userland/DevTools/HackStudio/Editor.cpp
@@ -345,12 +345,12 @@ void Editor::mousedown_event(GUI::MouseEvent& event)
void Editor::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();
if (urls.size() > 1) {
GUI::MessageBox::show(window(), "HackStudio can only open one file at a time!", "One at a time please!", GUI::MessageBox::Type::Error);
return;