diff win/dw.c @ 2021:0cce5fed4594

Win: get_HWND method does not seem to be working, so use Set/GetProperty() to save the browser window handle for use in the DWebBrowserEvents2 callbacks.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Sat, 09 Nov 2019 06:33:08 +0000
parents 663d79f28e46
children 28809bf17957
line wrap: on
line diff
--- a/win/dw.c	Fri Nov 08 13:06:47 2019 +0000
+++ b/win/dw.c	Sat Nov 09 06:33:08 2019 +0000
@@ -2386,16 +2386,22 @@
                   break;
                case WM_USER+100:
                   {
-                      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);
+                     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);
+                     }
                   }
                   break;
                case WM_USER+101:
                   {
-                      int (DWSIGNAL *htmlchangedfunc)(HWND, int, char *, void *) = tmp->signalfunction;
-                      
-                      return htmlchangedfunc(tmp->window, DW_POINTER_TO_INT(mp1), (char *)mp2, tmp->data);
+                     if(hWnd == tmp->window)
+                     {
+                        int (DWSIGNAL *htmlchangedfunc)(HWND, int, char *, void *) = tmp->signalfunction;
+
+                        return htmlchangedfunc(tmp->window, DW_POINTER_TO_INT(mp1), (char *)mp2, tmp->data);
+                     }
                   }
                   break;
             }