dsh-gufa-code 1.3.188 → 1.3.189
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/client.js
CHANGED
|
Binary file
|
|
@@ -1049,12 +1049,20 @@ class FloatApp {
|
|
|
1049
1049
|
};
|
|
1050
1050
|
|
|
1051
1051
|
namespace {
|
|
1052
|
+
BOOL CALLBACK CountChildWindow(HWND, LPARAM lparam) {
|
|
1053
|
+
if (lparam != 0) *reinterpret_cast<int*>(lparam) += 1;
|
|
1054
|
+
return TRUE;
|
|
1055
|
+
}
|
|
1056
|
+
|
|
1052
1057
|
BOOL CALLBACK SetChildClickThrough(HWND child, LPARAM lparam) {
|
|
1053
1058
|
const bool enable = lparam != 0;
|
|
1054
1059
|
LONG_PTR exStyle = GetWindowLongPtrW(child, GWL_EXSTYLE);
|
|
1055
1060
|
LONG_PTR next = enable ? (exStyle | WS_EX_TRANSPARENT)
|
|
1056
1061
|
: (exStyle & ~static_cast<LONG_PTR>(WS_EX_TRANSPARENT));
|
|
1057
1062
|
if (next != exStyle) SetWindowLongPtrW(child, GWL_EXSTYLE, next);
|
|
1063
|
+
/* windowed 模式的 WebView2 是子 HWND,不会继承父窗口的 ex-style;
|
|
1064
|
+
只设置 WS_EX_TRANSPARENT 仍可能被它吃掉点击。穿透期间直接禁用输入。 */
|
|
1065
|
+
EnableWindow(child, enable ? FALSE : TRUE);
|
|
1058
1066
|
return TRUE;
|
|
1059
1067
|
}
|
|
1060
1068
|
} // namespace
|
|
@@ -2546,8 +2554,12 @@ void FloatApp::ApplyClickThrough() {
|
|
|
2546
2554
|
SetWindowPos(hwnd_, nullptr, 0, 0, 0, 0,
|
|
2547
2555
|
SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE | SWP_FRAMECHANGED);
|
|
2548
2556
|
}
|
|
2557
|
+
int childCount = 0;
|
|
2558
|
+
EnumChildWindows(hwnd_, CountChildWindow, reinterpret_cast<LPARAM>(&childCount));
|
|
2549
2559
|
EnumChildWindows(hwnd_, SetChildClickThrough, clickThrough_ ? 1 : 0);
|
|
2550
|
-
LogFmt(L"click-through=%d", clickThrough_ ? 1 : 0
|
|
2560
|
+
LogFmt(L"click-through=%d mode=%s layered=%d children=%d", clickThrough_ ? 1 : 0,
|
|
2561
|
+
hostingMode_ == HostingMode::Composition ? L"composition" : L"windowed",
|
|
2562
|
+
clickThroughLayered_ ? 1 : 0, childCount);
|
|
2551
2563
|
}
|
|
2552
2564
|
|
|
2553
2565
|
void FloatApp::StopFollowing() {
|
package/package.json
CHANGED