mirror of
https://github.com/valinet/ExplorerPatcher.git
synced 2024-11-28 01:10:55 +01:00
Weather: Fixed a bug that had "COM Surrogate" display as a running
app in Task Manager after the widget flyout was opened the first time
This commit is contained in:
parent
52e86d739a
commit
5e17f5a817
@ -1560,6 +1560,12 @@ HRESULT STDMETHODCALLTYPE epw_Weather_Initialize(EPWeather* _this, WCHAR wszName
|
|||||||
|
|
||||||
HRESULT STDMETHODCALLTYPE epw_Weather_Show(EPWeather* _this)
|
HRESULT STDMETHODCALLTYPE epw_Weather_Show(EPWeather* _this)
|
||||||
{
|
{
|
||||||
|
SetLastError(0);
|
||||||
|
LONG_PTR dwExStyle = GetWindowLongPtrW(_this->hWnd, GWL_EXSTYLE);
|
||||||
|
if (!GetLastError())
|
||||||
|
{
|
||||||
|
SetWindowLongPtrW(_this->hWnd, GWL_EXSTYLE, WS_EX_TOOLWINDOW | dwExStyle);
|
||||||
|
}
|
||||||
INT preference = InterlockedAdd64(&_this->dwWindowCornerPreference, 0);
|
INT preference = InterlockedAdd64(&_this->dwWindowCornerPreference, 0);
|
||||||
DwmSetWindowAttribute(_this->hWnd, DWMWA_WINDOW_CORNER_PREFERENCE, &preference, sizeof(preference));
|
DwmSetWindowAttribute(_this->hWnd, DWMWA_WINDOW_CORNER_PREFERENCE, &preference, sizeof(preference));
|
||||||
PostMessageW(_this->hWnd, EP_WEATHER_WM_REBOUND_BROWSER, 0, 0);
|
PostMessageW(_this->hWnd, EP_WEATHER_WM_REBOUND_BROWSER, 0, 0);
|
||||||
@ -1570,6 +1576,12 @@ HRESULT STDMETHODCALLTYPE epw_Weather_Show(EPWeather* _this)
|
|||||||
|
|
||||||
HRESULT STDMETHODCALLTYPE epw_Weather_Hide(EPWeather* _this)
|
HRESULT STDMETHODCALLTYPE epw_Weather_Hide(EPWeather* _this)
|
||||||
{
|
{
|
||||||
|
SetLastError(0);
|
||||||
|
LONG_PTR dwExStyle = GetWindowLongPtrW(_this->hWnd, GWL_EXSTYLE);
|
||||||
|
if (!GetLastError())
|
||||||
|
{
|
||||||
|
SetWindowLongPtrW(_this->hWnd, GWL_EXSTYLE, ~WS_EX_TOOLWINDOW & dwExStyle);
|
||||||
|
}
|
||||||
ShowWindow(_this->hWnd, SW_HIDE);
|
ShowWindow(_this->hWnd, SW_HIDE);
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user