quieten down windows debug

This commit is contained in:
Vincent Sanders 2019-05-12 00:17:25 +01:00
parent a5e4bf8220
commit 2db39b1f7d
2 changed files with 18 additions and 13 deletions

View File

@ -16,20 +16,25 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _NETSURF_WINDOWS_WINDBG_H_
#define _NETSURF_WINDOWS_WINDBG_H_
#ifndef NETSURF_WINDOWS_WINDBG_H
#define NETSURF_WINDOWS_WINDBG_H
#include "utils/log.h"
const char *msg_num_to_name(int msg);
void win_perror(const char *lpszFunction);
/**
* log windows message
*
* log a windows message with symbols converted to human redable
*/
#define LOG_WIN_MSG(h, m, w, l) \
if (((m) != WM_SETCURSOR) && \
((m) != WM_MOUSEMOVE) && \
((m) != WM_NCHITTEST) && \
((m) != WM_ENTERIDLE)) \
NSLOG(netsurf, INFO, \
NSLOG(netsurf, DEBUG, \
"%s, hwnd %p, w 0x%x, l 0x%Ix", \
msg_num_to_name(m), h, w, l)

View File

@ -230,7 +230,7 @@ nsws_window_toolbar_command(struct gui_window *gw,
int identifier,
HWND ctrl_window)
{
NSLOG(netsurf, INFO,
NSLOG(netsurf, DEBUG,
"notification_code %d identifier %d ctrl_window %p",
notification_code,
identifier,
@ -241,39 +241,39 @@ nsws_window_toolbar_command(struct gui_window *gw,
case IDC_MAIN_URLBAR:
switch (notification_code) {
case EN_CHANGE:
NSLOG(netsurf, INFO, "EN_CHANGE");
NSLOG(netsurf, DEBUG, "EN_CHANGE");
break;
case EN_ERRSPACE:
NSLOG(netsurf, INFO, "EN_ERRSPACE");
NSLOG(netsurf, DEBUG, "EN_ERRSPACE");
break;
case EN_HSCROLL:
NSLOG(netsurf, INFO, "EN_HSCROLL");
NSLOG(netsurf, DEBUG, "EN_HSCROLL");
break;
case EN_KILLFOCUS:
NSLOG(netsurf, INFO, "EN_KILLFOCUS");
NSLOG(netsurf, DEBUG, "EN_KILLFOCUS");
break;
case EN_MAXTEXT:
NSLOG(netsurf, INFO, "EN_MAXTEXT");
NSLOG(netsurf, DEBUG, "EN_MAXTEXT");
break;
case EN_SETFOCUS:
NSLOG(netsurf, INFO, "EN_SETFOCUS");
NSLOG(netsurf, DEBUG, "EN_SETFOCUS");
break;
case EN_UPDATE:
NSLOG(netsurf, INFO, "EN_UPDATE");
NSLOG(netsurf, DEBUG, "EN_UPDATE");
break;
case EN_VSCROLL:
NSLOG(netsurf, INFO, "EN_VSCROLL");
NSLOG(netsurf, DEBUG, "EN_VSCROLL");
break;
default:
NSLOG(netsurf, INFO, "Unknown notification_code");
NSLOG(netsurf, DEBUG, "Unknown notification_code");
break;
}
break;