Mercurial > dwindows
diff win/dw.c @ 2001:f7acca46f795
Win: Fixes for Edge (Chromium) embedding, the loading can be delayed so...
prior to finishing loading save location and raw HTML data requests and
then actually load it when the browser context has finished loading.
Also actually detect Edge (Chromium) instead of just returning TRUE.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Thu, 31 Oct 2019 21:28:32 +0000 |
parents | 77e43d71eaa7 |
children | c30f4354966e |
line wrap: on
line diff
--- a/win/dw.c Thu Oct 31 08:26:58 2019 +0000 +++ b/win/dw.c Thu Oct 31 21:28:32 2019 +0000 @@ -4285,25 +4285,6 @@ RegisterClass(&wc); -#if (defined(BUILD_DLL) || defined(BUILD_HTML)) - /* Register HTML renderer class */ - memset(&wc, 0, sizeof(WNDCLASS)); - wc.lpszClassName = BrowserClassName; - wc.style = CS_HREDRAW | CS_VREDRAW; -#ifdef BUILD_EDGE - /* Check if Microsoft Edge (Chromium) is installed */ - if(_DW_EDGE_DETECTED = _dw_edge_detect()) - { - wc.lpfnWndProc = (WNDPROC)_edgeWindowProc; - } - else -#endif - { - wc.lpfnWndProc = (WNDPROC)_browserWindowProc; - } - RegisterClass(&wc); -#endif - /* Create a set of brushes using the default OS/2 and DOS colors */ for(z=0;z<18;z++) _colors[z] = CreateSolidBrush(RGB(_red[z],_green[z],_blue[z])); @@ -4340,6 +4321,25 @@ exit(1); } +#if (defined(BUILD_DLL) || defined(BUILD_HTML)) + /* Register HTML renderer class */ + memset(&wc, 0, sizeof(WNDCLASS)); + wc.lpszClassName = BrowserClassName; + wc.style = CS_HREDRAW | CS_VREDRAW; +#ifdef BUILD_EDGE + /* Check if Microsoft Edge (Chromium) is installed */ + if (_DW_EDGE_DETECTED = _dw_edge_detect()) + { + wc.lpfnWndProc = (WNDPROC)_edgeWindowProc; + } + else +#endif + { + wc.lpfnWndProc = (WNDPROC)_browserWindowProc; + } + RegisterClass(&wc); +#endif + /* Create a tooltip. */ hwndTooltip = CreateWindowEx(WS_EX_TOPMOST, TOOLTIPS_CLASS, NULL, WS_POPUP | TTS_NOPREFIX | TTS_ALWAYSTIP, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, DW_HWND_OBJECT, NULL, DWInstance,NULL);