diff options
-rw-r--r-- | source/blender/windowmanager/WM_api.h | 2 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_event_system.c | 18 |
2 files changed, 2 insertions, 18 deletions
diff --git a/source/blender/windowmanager/WM_api.h b/source/blender/windowmanager/WM_api.h index 26a1c7038d8..493fe82ff80 100644 --- a/source/blender/windowmanager/WM_api.h +++ b/source/blender/windowmanager/WM_api.h @@ -387,9 +387,7 @@ void WM_gestures_remove(struct bContext *C); /* fileselecting support */ void WM_event_add_fileselect(struct bContext *C, struct wmOperator *op); void WM_event_fileselect_event(struct wmWindowManager *wm, void *ophandle, int eventval); -#ifndef NDEBUG void WM_event_print(const struct wmEvent *event); -#endif void WM_operator_region_active_win_set(struct bContext *C); diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c index 4515ae92f66..01dc77127d2 100644 --- a/source/blender/windowmanager/intern/wm_event_system.c +++ b/source/blender/windowmanager/intern/wm_event_system.c @@ -81,9 +81,7 @@ #include "wm_event_system.h" #include "wm_event_types.h" -#ifndef NDEBUG -# include "RNA_enum_types.h" -#endif +#include "RNA_enum_types.h" static void wm_notifier_clear(wmNotifier *note); static void update_tablet_data(wmWindow *win, wmEvent *event); @@ -550,8 +548,6 @@ void WM_operator_region_active_win_set(bContext *C) } /* for debugging only, getting inspecting events manually is tedious */ -#ifndef NDEBUG - void WM_event_print(const wmEvent *event) { if (event) { @@ -593,8 +589,6 @@ void WM_event_print(const wmEvent *event) } } -#endif /* NDEBUG */ - /** * Show the report in the info header. */ @@ -1969,15 +1963,11 @@ static int wm_action_not_handled(int action) static int wm_handlers_do_intern(bContext *C, wmEvent *event, ListBase *handlers) { -#ifndef NDEBUG const bool do_debug_handler = (G.debug & G_DEBUG_HANDLERS) && /* comment this out to flood the console! (if you really want to test) */ !ELEM(event->type, MOUSEMOVE, INBETWEEN_MOUSEMOVE) ; -# define PRINT if (do_debug_handler) printf -#else -# define PRINT(format, ...) -#endif +# define PRINT if (do_debug_handler) printf wmWindowManager *wm = CTX_wm_manager(C); wmEventHandler *handler, *nexthandler; @@ -2382,20 +2372,16 @@ void wm_event_do_handlers(bContext *C) while ( (event = win->queue.first) ) { int action = WM_HANDLER_CONTINUE; -#ifndef NDEBUG if (G.debug & (G_DEBUG_HANDLERS | G_DEBUG_EVENTS) && !ELEM(event->type, MOUSEMOVE, INBETWEEN_MOUSEMOVE)) { printf("\n%s: Handling event\n", __func__); WM_event_print(event); } -#endif /* take care of pie event filter */ if (wm_event_pie_filter(win, event)) { -#ifndef NDEBUG if (G.debug & (G_DEBUG_HANDLERS | G_DEBUG_EVENTS) && !ELEM(event->type, MOUSEMOVE, INBETWEEN_MOUSEMOVE)) { printf("\n%s: event filtered due to pie button pressed\n", __func__); } -#endif BLI_remlink(&win->queue, event); wm_event_free(event); continue; |