From b163b7be485aefb6ebd40c4ec6cbc76c671514f7 Mon Sep 17 00:00:00 2001 From: David Capello Date: Fri, 26 Feb 2021 14:08:40 -0300 Subject: [PATCH] Simplify REPORT_EVENTS code in ui::Manager --- src/ui/manager.cpp | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/src/ui/manager.cpp b/src/ui/manager.cpp index 22f20e8db..ec4330317 100644 --- a/src/ui/manager.cpp +++ b/src/ui/manager.cpp @@ -34,10 +34,6 @@ #include "base/thread.h" #endif -#ifdef REPORT_EVENTS -#include -#endif - #include #include #include @@ -861,16 +857,9 @@ void Manager::setFocus(Widget* widget) void Manager::setMouse(Widget* widget) { #ifdef REPORT_EVENTS - std::cout << "Manager::setMouse "; - if (widget) { - std::cout << typeid(*widget).name(); - if (!widget->id().empty()) - std::cout << " (" << widget->id() << ")"; - } - else { - std::cout << "null"; - } - std::cout << std::endl; + TRACEARGS("Manager::setMouse ", + (widget ? typeid(*widget).name(): "null"), + (widget ? widget->id(): "")); #endif if ((mouse_widget != widget) && (!capture_widget)) { @@ -1564,12 +1553,7 @@ bool Manager::sendMessageToWidget(Message* msg, Widget* widget) if (surface->clipRect(paintMsg->rect())) { #ifdef REPORT_EVENTS - std::cout << " - clip(" - << paintMsg->rect().x << ", " - << paintMsg->rect().y << ", " - << paintMsg->rect().w << ", " - << paintMsg->rect().h << ")" - << std::endl; + TRACEARGS(" - clipRect ", paintMsg->rect()); #endif #ifdef DEBUG_PAINT_EVENTS