|
@@ -4,6 +4,7 @@
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
*/
|
|
|
|
|
|
+#include <AK/Debug.h>
|
|
|
#include <AK/StringBuilder.h>
|
|
|
#include <AK/Utf8View.h>
|
|
|
#include <AK/Vector.h>
|
|
@@ -307,7 +308,7 @@ void AbstractView::mousemove_event(MouseEvent& event)
|
|
|
// Prevent this by just ignoring later drag initiations (until the current drag operation ends).
|
|
|
TemporaryChange dragging { m_is_dragging, true };
|
|
|
|
|
|
- dbgln("Initiate drag!");
|
|
|
+ dbgln_if(DRAG_DEBUG, "Initiate drag!");
|
|
|
auto drag_operation = DragOperation::construct();
|
|
|
|
|
|
drag_operation->set_mime_data(m_model->mime_data(m_selection));
|
|
@@ -316,10 +317,10 @@ void AbstractView::mousemove_event(MouseEvent& event)
|
|
|
|
|
|
switch (outcome) {
|
|
|
case DragOperation::Outcome::Accepted:
|
|
|
- dbgln("Drag was accepted!");
|
|
|
+ dbgln_if(DRAG_DEBUG, "Drag was accepted!");
|
|
|
break;
|
|
|
case DragOperation::Outcome::Cancelled:
|
|
|
- dbgln("Drag was cancelled!");
|
|
|
+ dbgln_if(DRAG_DEBUG, "Drag was cancelled!");
|
|
|
m_might_drag = false;
|
|
|
break;
|
|
|
default:
|
|
@@ -754,7 +755,7 @@ void AbstractView::drag_enter_event(DragEvent& event)
|
|
|
// We might be able to reduce event traffic by communicating the set of drag-accepting
|
|
|
// rects in this widget to the windowing system somehow.
|
|
|
event.accept();
|
|
|
- dbgln("accepting drag of {}", event.mime_types().first());
|
|
|
+ dbgln_if(DRAG_DEBUG, "accepting drag of {}", event.mime_types().first());
|
|
|
}
|
|
|
|
|
|
void AbstractView::drag_move_event(DragEvent& event)
|