Mercurial > dwindows
diff win/dw.c @ 2045:cb195d76de8e
Win: Make HTML_RESULT event match other platforms and disable dev tools when not DEBUG.
When javascript_run() does not have a result other platforms return a NULL pointer,
but Edge Chromium returns a string "null"; this change checks for "null" and makes it
a NULL pointer instead. This may cause problems when a "null" string result is the
expected result. Additionally disable developer tools for the HTML widget when DEBUG
is not defined when compiling.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Mon, 25 Nov 2019 04:47:43 +0000 |
parents | 82e5c998df2e |
children | e8a34118a845 |
line wrap: on
line diff
--- a/win/dw.c Mon Nov 25 03:16:45 2019 +0000 +++ b/win/dw.c Mon Nov 25 04:47:43 2019 +0000 @@ -2389,8 +2389,9 @@ if(hWnd == tmp->window) { int (DWSIGNAL *htmlresultfunc)(HWND, int, char *, void *, void *) = tmp->signalfunction; - - return htmlresultfunc(tmp->window, mp1 ? DW_ERROR_NONE : DW_ERROR_UNKNOWN, (char *)mp1, (void *)mp2, tmp->data); + void** params = (void**)mp1; + + return htmlresultfunc(tmp->window, DW_POINTER_TO_INT(params[1]), (char *)params[0], (void *)mp2, tmp->data); } } break;