From 02b5285aa0842126827324003141e5d0b89a6dea Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Fri, 22 Apr 2016 14:56:09 -0400 Subject: [PATCH] Some more filter procedure rewriting, preparing for the future dialog message hack attempt. --- windows/main.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/windows/main.cpp b/windows/main.cpp index 6d4054a5..5177a6d1 100644 --- a/windows/main.cpp +++ b/windows/main.cpp @@ -6,16 +6,19 @@ static HHOOK filter; static LRESULT CALLBACK filterProc(int code, WPARAM wParam, LPARAM lParam) { MSG *msg = (MSG *) lParam; - BOOL discard; if (code < 0) goto callNext; - discard = !areaFilter(msg); + if (areaFilter(msg)) // don't continue to our IsDialogMessage() hack if the area handled it + goto discard; - if (discard) - goto callNext; + // TODO IsDialogMessage() hack here + // otherwise keep going + goto callNext; + +discard: // we handled it; discard the message so the dialog manager doesn't see it return 1;