Skip to content
This repository has been archived by the owner on Nov 18, 2023. It is now read-only.

Commit

Permalink
Merge branch 'valinet-master'
Browse files Browse the repository at this point in the history
  • Loading branch information
creeper-0910 committed Jun 6, 2022
2 parents 0bfc1c4 + 98f30a0 commit f79e84e
Show file tree
Hide file tree
Showing 8 changed files with 89 additions and 13 deletions.
12 changes: 10 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ OSビルド 22000.708 でテストされました。

##### 1

* OS ビルド 22000.708 をビルトインでサポート
* OS ビルド 22000.708 をビルトインでサポートされました
* 新しい Windows Spotlight デスクトップ背景機能のための設定オプションを追加しました。
* この画像について学ぶ」アイコンを非表示にします。
* Windowsスポットライトアイコンのコンテキストメニューから、デスクトップのコンテキストメニューに複製される項目を選択します(レガシーコンテキストメニューのみ)。
Expand All @@ -26,9 +26,17 @@ OSビルド 22000.708 でテストされました。

##### 3

* Windows 10 のタスクバー使用時に「デスクトップを表示」ボタンを非表示にし、機能を保持するオ プションを追加しました
* Windows 10 のタスクバー使用時に「デスクトップを表示」ボタンを非表示にし、機能を保持するオプションを追加しました
* Windows 10 でスタートメニューがデフォルトで中央に表示される不具合を修正

##### 4

* 天気予報のデータ読み込みに失敗した場合、「再読み込み」リンクを表示(提案いただいたVarun A.氏に感謝します)
* sws: 適切なサムネイルが得られない場合、プレースホルダのサムネイルを表示します(例:ウィンドウの幅や高さが無効な場合)
* sws: デスクトップがフォアグラウンドにあるときにスイッチャーが識別できないバグを修正
* sws: スイッチャーがフォアグラウンドウィンドウの変更を適切に検出することを妨げる意図しない影響を修正しました。
* sws: 非常に小さなウィンドウで、矩形領域が小さいためにスイッチャーで正しく動作しないバグを修正。

## 22000.675.45

OSビルド 22000.675 でテストされました。
Expand Down
8 changes: 6 additions & 2 deletions ExplorerPatcher/dllmain.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ DWORD S_Icon_Dark_TaskView = 0;
void* P_Icon_Dark_Widgets = NULL;
DWORD S_Icon_Dark_Widgets = 0;


BOOL g_bIsDesktopRaised = FALSE;

#include "utility.h"
#include "resource.h"
Expand Down Expand Up @@ -2424,6 +2424,10 @@ INT64 Shell_TrayWndSubclassProc(
DestroyMenu(hMenu);
}
}
else if (uMsg == 1368)
{
g_bIsDesktopRaised = (lParam & 1) == 0;
}
return DefSubclassProc(hWnd, uMsg, wParam, lParam);
}
#endif
Expand Down Expand Up @@ -9231,7 +9235,7 @@ BOOL shell32_DeleteMenu(HMENU hMenu, UINT uPosition, UINT uFlags)

BOOL shell32_TrackPopupMenu(HMENU hMenu, UINT uFlags, int x, int y, int nReserved, HWND hWnd, const RECT* prcRect)
{
if (IsSpotlightEnabled() && dwSpotlightDesktopMenuMask && RegisterWindowMessageW(L"WorkerW") == GetClassWord(GetParent(hWnd), GCW_ATOM) && bSpotlightIsDesktopContextMenu)
if (IsSpotlightEnabled() && dwSpotlightDesktopMenuMask && (GetPropW(GetParent(hWnd), L"DesktopWindow") && RegisterWindowMessageW(L"WorkerW") == GetClassWord(GetParent(hWnd), GCW_ATOM)) && bSpotlightIsDesktopContextMenu)
{
SpotlightHelper(dwSpotlightDesktopMenuMask, hWnd, hMenu, NULL);
}
Expand Down
2 changes: 1 addition & 1 deletion ep_weather_host/ep_weather.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ DEFINE_GUID(IID_IEPWeather,
#define EP_WEATHER_WM_SETDEVMODE (WM_USER + 13)
#define EP_WEATHER_WM_SETZOOMFACTOR (WM_USER + 14)

#define EP_WEATHER_HEIGHT_ERROR 260
#define EP_WEATHER_HEIGHT_ERROR 280
#define EP_WEATHER_HEIGHT 353
#define EP_WEATHER_WIDTH 673

Expand Down
19 changes: 19 additions & 0 deletions ep_weather_host/ep_weather_error_html.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,32 @@ body {\n\
justify-content: center;\n\
align-items: center;\n\
}\n\
@media (prefers-color-scheme: dark) {\n\
.refreshLink { color: #43a7ff; }\n\
}\n\
@media (prefers-color-scheme: light) {\n\
.refreshLink { color: #096bda; }\n\
}\n\
a:link {\n\
text-decoration: none;\n\
}\n\
a:visited {\n\
text-decoration: none;\n\
}\n\
a:hover {\n\
text-decoration: underline;\n\
}\n\
a:active {\n\
text-decoration: underline;\n\
}\n\
</style>\n\
</head>\n\
<body><center>\n\
<h1>&#128240;</h1>\n\
<h2>Unable to load weather information</h2>\n\
<p>Make sure that the location you have entered is correct.<br/>\n\
Verify that you are connected to the Internet.</p>\n\
<a class=\"refreshLink\" href=\"epweather://refresh\">Reload</a>\n\
</center></body>\n\
</html>";
#endif
36 changes: 34 additions & 2 deletions ep_weather_host/ep_weather_host.c
Original file line number Diff line number Diff line change
Expand Up @@ -351,9 +351,9 @@ HRESULT STDMETHODCALLTYPE ICoreWebView2_CreateCoreWebView2ControllerCompleted(IC
LONG64 dwDarkMode = InterlockedAdd64(&_this->g_darkModeEnabled, 0);
epw_Weather_SetDarkMode(_this, dwDarkMode, FALSE);

_this->pCoreWebView2->lpVtbl->add_PermissionRequested(_this->pCoreWebView2, &EPWeather_ICoreWebView2PermissionRequestedEventHandler, &_this->tkOnPermissionRequested);

_this->pCoreWebView2->lpVtbl->add_NavigationStarting(_this->pCoreWebView2, &EPWeather_ICoreWebView2NavigationStartingEventHandler, &_this->tkOnNavigationStarting);
_this->pCoreWebView2->lpVtbl->add_NavigationCompleted(_this->pCoreWebView2, &EPWeather_ICoreWebView2NavigationCompletedEventHandler, &_this->tkOnNavigationCompleted);
_this->pCoreWebView2->lpVtbl->add_PermissionRequested(_this->pCoreWebView2, &EPWeather_ICoreWebView2PermissionRequestedEventHandler, &_this->tkOnPermissionRequested);

_epw_Weather_NavigateToProvider(_this);

Expand Down Expand Up @@ -384,8 +384,28 @@ HRESULT STDMETHODCALLTYPE ICoreWebView2_CallDevToolsProtocolMethodCompleted(ICor
return S_OK;
}

HRESULT STDMETHODCALLTYPE ICoreWebView2_NavigationStarting(ICoreWebView2NavigationStartingEventHandler* _this2, ICoreWebView2* pCoreWebView2, ICoreWebView2NavigationStartingEventArgs* pCoreWebView2NavigationStartingEventArgs)
{
EPWeather* _this = EPWeather_Instance; // GetWindowLongPtrW(FindWindowW(_T(EPW_WEATHER_CLASSNAME), NULL), GWLP_USERDATA);
LPWSTR wszUri = NULL;
pCoreWebView2NavigationStartingEventArgs->lpVtbl->get_Uri(pCoreWebView2NavigationStartingEventArgs, &wszUri);
if (wszUri)
{
if (!_wcsicmp(wszUri, L"epweather://refresh"))
{
pCoreWebView2NavigationStartingEventArgs->lpVtbl->put_Cancel(pCoreWebView2NavigationStartingEventArgs, TRUE);
PostMessageW(_this->hWnd, EP_WEATHER_WM_FETCH_DATA, 0, 0);
}
CoTaskMemFree(wszUri);
}
return S_OK;
}

HRESULT STDMETHODCALLTYPE ICoreWebView2_NavigationCompleted(ICoreWebView2NavigationCompletedEventHandler* _this2, ICoreWebView2* pCoreWebView2, ICoreWebView2NavigationCompletedEventArgs* pCoreWebView2NavigationCompletedEventArgs)
{
COREWEBVIEW2_WEB_ERROR_STATUS dwStatus = COREWEBVIEW2_WEB_ERROR_STATUS_UNKNOWN;
pCoreWebView2NavigationCompletedEventArgs->lpVtbl->get_WebErrorStatus(pCoreWebView2NavigationCompletedEventArgs, &dwStatus);
if (dwStatus == COREWEBVIEW2_WEB_ERROR_STATUS_OPERATION_CANCELED) return S_OK;
AcquireSRWLockShared(&Lock_EPWeather_Instance);
EPWeather* _this = EPWeather_Instance; // GetWindowLongPtrW(FindWindowW(_T(EPW_WEATHER_CLASSNAME), NULL), GWLP_USERDATA);
BOOL bIsSuccess = FALSE;
Expand Down Expand Up @@ -1375,6 +1395,18 @@ DWORD WINAPI epw_Weather_MainThread(EPWeather* _this)

cleanup:

if (_this->tkOnNavigationStarting.value)
{
_this->pCoreWebView2->lpVtbl->remove_NavigationStarting(_this->pCoreWebView2, _this->tkOnNavigationStarting);
}
if (_this->tkOnNavigationCompleted.value)
{
_this->pCoreWebView2->lpVtbl->remove_NavigationCompleted(_this->pCoreWebView2, _this->tkOnNavigationCompleted);
}
if (_this->tkOnPermissionRequested.value)
{
_this->pCoreWebView2->lpVtbl->remove_PermissionRequested(_this->pCoreWebView2, _this->tkOnPermissionRequested);
}
if (_this->pCoreWebView2)
{
_this->pCoreWebView2->lpVtbl->Release(_this->pCoreWebView2);
Expand Down
17 changes: 15 additions & 2 deletions ep_weather_host/ep_weather_host.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,9 @@ typedef interface EPWeather
ITaskbarList* pTaskList;
ICoreWebView2Controller* pCoreWebView2Controller;
ICoreWebView2* pCoreWebView2;
EventRegistrationToken* tkOnNavigationCompleted;
EventRegistrationToken* tkOnPermissionRequested;
EventRegistrationToken tkOnNavigationStarting;
EventRegistrationToken tkOnNavigationCompleted;
EventRegistrationToken tkOnPermissionRequested;
RECT rc;
LONG64 dpiXInitial;
LONG64 dpiYInitial;
Expand Down Expand Up @@ -168,6 +169,7 @@ HRESULT STDMETHODCALLTYPE epw_Weather_static_QueryInterface(EPWeather* _this, RE

HRESULT STDMETHODCALLTYPE ICoreWebView2_CreateCoreWebView2EnvironmentCompleted(ICoreWebView2CreateCoreWebView2EnvironmentCompletedHandler* _this, HRESULT errorCode, ICoreWebView2Environment* pCoreWebView2Environment);
HRESULT STDMETHODCALLTYPE ICoreWebView2_CreateCoreWebView2ControllerCompleted(ICoreWebView2CreateCoreWebView2ControllerCompletedHandler* _this, HRESULT hr, ICoreWebView2Controller* pCoreWebView2Controller);
HRESULT STDMETHODCALLTYPE ICoreWebView2_NavigationStarting(ICoreWebView2NavigationStartingEventHandler* _this, ICoreWebView2* pCoreWebView2, ICoreWebView2NavigationStartingEventArgs* pCoreWebView2NavigationStartingEventArgs);
HRESULT STDMETHODCALLTYPE ICoreWebView2_NavigationCompleted(ICoreWebView2NavigationCompletedEventHandler* _this, ICoreWebView2* pCoreWebView2, ICoreWebView2NavigationCompletedEventArgs* pCoreWebView2NavigationCompletedEventArgs);
HRESULT STDMETHODCALLTYPE ICoreWebView2_ExecuteScriptCompleted(ICoreWebView2ExecuteScriptCompletedHandler* _this, HRESULT hr, LPCWSTR pResultObjectAsJson);
HRESULT STDMETHODCALLTYPE ICoreWebView2_get_AdditionalBrowserArguments(ICoreWebView2EnvironmentOptions* _this, LPWSTR* value);
Expand Down Expand Up @@ -201,6 +203,17 @@ static const ICoreWebView2CreateCoreWebView2ControllerCompletedHandler EPWeather
.lpVtbl = &EPWeather_ICoreWebView2CreateCoreWebView2ControllerCompletedHandlerVtbl
};

static const ICoreWebView2NavigationStartingEventHandlerVtbl EPWeather_ICoreWebView2NavigationStartingEventHandlerVtbl = {
.QueryInterface = epw_Weather_static_QueryInterface,
.AddRef = epw_Weather_static_AddRefRelease,
.Release = epw_Weather_static_AddRefRelease,
.Invoke = ICoreWebView2_NavigationStarting,
};

static const ICoreWebView2NavigationStartingEventHandler EPWeather_ICoreWebView2NavigationStartingEventHandler = {
.lpVtbl = &EPWeather_ICoreWebView2NavigationStartingEventHandlerVtbl
};

static const ICoreWebView2NavigationCompletedEventHandlerVtbl EPWeather_ICoreWebView2NavigationCompletedEventHandlerVtbl = {
.QueryInterface = epw_Weather_static_QueryInterface,
.AddRef = epw_Weather_static_AddRefRelease,
Expand Down
6 changes: 3 additions & 3 deletions version.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#define VER_MAJOR 22000
#define VER_MINOR 708
#define VER_BUILD_HI 46
#define VER_BUILD_LO 3
#define VER_BUILD_LO 4
#define VER_FLAGS VS_FF_PRERELEASE


Expand All @@ -12,5 +12,5 @@
#define VER_STR(arg) #arg

// The String form of the version numbers
#define VER_FILE_STRING VALUE "FileVersion", "22000.708.46.3"
#define VER_PRODUCT_STRING VALUE "ProductVersion", "22000.708.46.3"
#define VER_FILE_STRING VALUE "FileVersion", "22000.708.46.4"
#define VER_PRODUCT_STRING VALUE "ProductVersion", "22000.708.46.4"

0 comments on commit f79e84e

Please sign in to comment.