mirror of
https://github.com/valinet/ExplorerPatcher.git
synced 2025-01-18 16:54:13 +01:00
Weather: Refactored browser rebound procedure
This commit is contained in:
parent
26b6646da6
commit
879ec09488
@ -51,6 +51,7 @@ DEFINE_GUID(IID_IEPWeather,
|
||||
|
||||
#define EP_WEATHER_WM_FETCH_DATA (WM_USER + 10)
|
||||
#define EP_WEATHER_WM_SET_BROWSER_THEME (WM_USER + 11)
|
||||
#define EP_WEATHER_WM_REBOUND_BROWSER (WM_USER + 12)
|
||||
|
||||
#define EP_WEATHER_HEIGHT 391
|
||||
#define EP_WEATHER_WIDTH 690
|
||||
|
@ -636,7 +636,7 @@ LRESULT CALLBACK epw_Weather_WindowProc(_In_ HWND hWnd, _In_ UINT uMsg, _In_ WPA
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
else if (uMsg == WM_TIMER && wParam == EP_WEATHER_TIMER_REBOUND_BROWSER)
|
||||
else if (wParam == EP_WEATHER_WM_REBOUND_BROWSER)
|
||||
{
|
||||
LPWSTR uri = NULL;
|
||||
if (_this->pCoreWebView2)
|
||||
@ -645,7 +645,6 @@ LRESULT CALLBACK epw_Weather_WindowProc(_In_ HWND hWnd, _In_ UINT uMsg, _In_ WPA
|
||||
}
|
||||
_ep_weather_ReboundBrowser(_this, !wcscmp(L"about:blank", uri ? uri : L""));
|
||||
CoTaskMemFree(uri);
|
||||
KillTimer(_this->hWnd, EP_WEATHER_TIMER_REBOUND_BROWSER);
|
||||
return 0;
|
||||
}
|
||||
else if (uMsg == EP_WEATHER_WM_FETCH_DATA)
|
||||
@ -1147,7 +1146,7 @@ HRESULT STDMETHODCALLTYPE epw_Weather_Initialize(EPWeather* _this, WCHAR wszName
|
||||
|
||||
HRESULT STDMETHODCALLTYPE epw_Weather_Show(EPWeather* _this)
|
||||
{
|
||||
SetTimer(_this->hWnd, EP_WEATHER_TIMER_REBOUND_BROWSER, EP_WEATHER_TIMER_REBOUND_BROWSER_DELAY, NULL);
|
||||
PostMessageW(_this->hWnd, EP_WEATHER_WM_REBOUND_BROWSER, 0, 0);
|
||||
ShowWindow(_this->hWnd, SW_SHOW);
|
||||
_this->pTaskList->lpVtbl->DeleteTab(_this->pTaskList, _this->hWnd);
|
||||
return S_OK;
|
||||
|
@ -22,11 +22,9 @@ DEFINE_GUID(IID_ITaskbarList,
|
||||
|
||||
#define EP_WEATHER_TIMER_REQUEST_REPAINT 1
|
||||
#define EP_WEATHER_TIMER_REQUEST_REPAINT_DELAY 1000
|
||||
#define EP_WEATHER_TIMER_REBOUND_BROWSER 2
|
||||
#define EP_WEATHER_TIMER_REBOUND_BROWSER_DELAY 1
|
||||
#define EP_WEATHER_TIMER_REQUEST_REFRESH 10
|
||||
#define EP_WEATHER_TIMER_REQUEST_REFRESH_DELAY 2000
|
||||
#define EP_WEATHER_TIMER_SCHEDULE_REFRESH 10
|
||||
#define EP_WEATHER_TIMER_SCHEDULE_REFRESH 11
|
||||
|
||||
typedef interface EPWeather
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user