Skip to content

Commit da7920b

Browse files
committed
release:v3.0.21-alpha.21
1 parent 516f0b9 commit da7920b

File tree

5 files changed

+26
-14
lines changed

5 files changed

+26
-14
lines changed

docs/2.更新记录.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -57,22 +57,21 @@
5757

5858
---
5959

60-
## v3.0.20-alpha.20 发布日期:待定
60+
## v3.1.0-beta.0 发布日期:待定
6161

6262
### 功能
6363

6464
- 社区
6565
- [ ] 投稿
66-
- [ ] 会员购买
6766
- [ ] 支持 本地html 壁纸
6867
- [ ] 支持 在线网址 壁纸
69-
- [ ] 播放视频界面显示loading
70-
- [ ] 在线本地预览壁纸(会员)
71-
- [ ] 本地列表中显示下载中进度
68+
- [ ] 在桌面预览社区壁纸(会员)
69+
- [ ] 本地列表中显示下载中进度
7270
- [ ] 支持 本地html 壁纸
7371
- [ ] 支持 在线网址 壁纸
7472
- [ ] 播放视频界面显示loading
75-
- [ ] 社区详情页打开会偶尔白色主题闪烁
73+
- [ ] 社区详情页打开会偶尔白色主题闪烁
74+
- [ ] 壁纸切换增加loading状态,防止快速操作产生bug
7675

7776
### 修复
7877

@@ -81,14 +80,15 @@
8180

8281
---
8382

84-
## v3.0.21-alpha.21 发布日期:待定
83+
## v3.0.21-alpha.21 发布日期:2024.7.15
8584

8685
### 功能
8786

8887
- 社区
8988
- [x] 邮箱注册
9089
- [x] 更换邮箱
9190
- [x] 找回密码
91+
- [x] 会员购买
9292
- [x] 增加打开本地日志目录按钮(方便查找日志,定位bug)
9393
- [x] 巨应3社区访问优化(更快,开销也更大了)
9494
- [x] 更新mpv播放器到 mpv-x86_64-v3-20240707-git-00f43e0.7z

src/giantapp-wallpaper-client/Client.App/Client.App.wapproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@
104104
<Import Project="$(WapProjPath)\Microsoft.DesktopBridge.targets" />
105105
<ItemGroup>
106106
<!--<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.26100.1" PrivateAssets="all" />-->
107-
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.26100.1" PrivateAssets="all" />
107+
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22621.3233" PrivateAssets="all" />
108108
</ItemGroup>
109109
<ItemGroup>
110110
<ProjectReference Include="..\Client\Client.csproj" />

src/giantapp-wallpaper-client/Client.App/Package.appxmanifest

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<Identity
1111
Name="24765mscoder.3"
1212
Publisher="CN=49BC8659-1B4C-4520-B1FB-ED98CFA366C4"
13-
Version="3.0.20.0" />
13+
Version="3.0.21.0" />
1414

1515
<Properties>
1616
<DisplayName>ms-resource:Resources/PackageDisplayName</DisplayName>

src/giantapp-wallpaper-client/WallpaperCore/Libs/DesktopHelper.cs

+13-4
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,20 @@ public static bool SendHandleToDesktopBottom(IntPtr handler, Rectangle? bounds)
111111
//先放到屏幕外,防止产生残影
112112
_ = PInvoke.SetWindowPos(hwnd, HWND.Null, -10000, 0, 0, 0, Windows.Win32.UI.WindowsAndMessaging.SET_WINDOW_POS_FLAGS.SWP_NOACTIVATE);
113113

114-
var res = PInvoke.SetParent(hwnd, worker);
115-
if (res == HWND.Null)
114+
var res = HWND.Null;
115+
int attempts = 0;
116+
const int maxAttempts = 50; // 尝试次数
117+
while (res.IsNull && attempts < maxAttempts)
116118
{
117-
//获取错误
118-
//var test = PInvoke.GetLastError();
119+
res = PInvoke.SetParent(hwnd, worker);
120+
if (res.IsNull)
121+
{
122+
// 获取错误
123+
// var test = PInvoke.GetLastError();
124+
System.Threading.Thread.Sleep(100); // 等待100ms后重试
125+
}
126+
attempts++;
127+
_logger.Info($"SendHandleToDesktopBottom {handler} worker:{worker} SetParentRes:{res} attempts:{attempts}");
119128
}
120129

121130
////检查parent是否生效

src/giantapp-wallpaper-client/WallpaperCore/WallpaperRenders/VideoRender.cs

+4-1
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,10 @@ internal override async Task Play(Wallpaper? wallpaper)
150150
{
151151
await _playerApi.LaunchAsync(playlistPath);
152152
var bounds = WallpaperApi.GetScreen(screenIndex)?.Bounds;
153-
DeskTopHelper.SendHandleToDesktopBottom(_playerApi.MainHandle, bounds);
153+
await Task.Run(() =>
154+
{
155+
DeskTopHelper.SendHandleToDesktopBottom(_playerApi.MainHandle, bounds);
156+
});
154157
}
155158
else
156159
{

0 commit comments

Comments
 (0)