mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 04:09:13 +00:00
LibGUI+AK: Add DRAG_DEBUG opt and put drag operations behind dbgln_if
No need to have this enabled all the time.
This commit is contained in:
parent
f43b69f8e2
commit
4459cb33ed
Notes:
sideshowbarker
2024-07-18 02:47:59 +09:00
Author: https://github.com/metmo
Commit: 4459cb33ed
Pull-request: https://github.com/SerenityOS/serenity/pull/11788
4 changed files with 14 additions and 7 deletions
|
@ -5,6 +5,7 @@
|
|||
*/
|
||||
|
||||
#include <AK/Assertions.h>
|
||||
#include <AK/Debug.h>
|
||||
#include <AK/JsonObject.h>
|
||||
#include <LibGUI/Action.h>
|
||||
#include <LibGUI/Application.h>
|
||||
|
@ -553,17 +554,17 @@ void Widget::drag_enter_event(DragEvent& event)
|
|||
{
|
||||
StringBuilder builder;
|
||||
builder.join(',', event.mime_types());
|
||||
dbgln("{} {:p} DRAG ENTER @ {}, {}", class_name(), this, event.position(), builder.string_view());
|
||||
dbgln_if(DRAG_DEBUG, "{} {:p} DRAG ENTER @ {}, {}", class_name(), this, event.position(), builder.string_view());
|
||||
}
|
||||
|
||||
void Widget::drag_leave_event(Event&)
|
||||
{
|
||||
dbgln("{} {:p} DRAG LEAVE", class_name(), this);
|
||||
dbgln_if(DRAG_DEBUG, "{} {:p} DRAG LEAVE", class_name(), this);
|
||||
}
|
||||
|
||||
void Widget::drop_event(DropEvent& event)
|
||||
{
|
||||
dbgln("{} {:p} DROP @ {}, '{}'", class_name(), this, event.position(), event.text());
|
||||
dbgln_if(DRAG_DEBUG, "{} {:p} DROP @ {}, '{}'", class_name(), this, event.position(), event.text());
|
||||
event.ignore();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue