From f99507bf02d5c108f68c3fff204a2da64afed34d Mon Sep 17 00:00:00 2001 From: Karol Kosek Date: Mon, 12 Jul 2021 13:25:52 +0200 Subject: [PATCH] LibGUI: Ignore drop events by default Before this change, parent widgets such as Buttons or Labels were stealing drop events their parents. I noticed it during drag-n-dropping files into visualization widgets in Sound Player (which takes practically the entire application size and gave impression that drop events weren't supported in the app at all). --- Userland/Libraries/LibGUI/Widget.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Userland/Libraries/LibGUI/Widget.cpp b/Userland/Libraries/LibGUI/Widget.cpp index 855d830a6b..8765a97d2c 100644 --- a/Userland/Libraries/LibGUI/Widget.cpp +++ b/Userland/Libraries/LibGUI/Widget.cpp @@ -554,6 +554,7 @@ void Widget::drag_leave_event(Event&) void Widget::drop_event(DropEvent& event) { dbgln("{} {:p} DROP @ {}, '{}'", class_name(), this, event.position(), event.text()); + event.ignore(); } void Widget::theme_change_event(ThemeChangeEvent&)