diff --git a/Ink Canvas/Helpers/PPTUIManager.cs b/Ink Canvas/Helpers/PPTUIManager.cs index 718c1ef1..dc5c2b86 100644 --- a/Ink Canvas/Helpers/PPTUIManager.cs +++ b/Ink Canvas/Helpers/PPTUIManager.cs @@ -99,6 +99,8 @@ namespace Ink_Canvas.Helpers UpdateNavigationButtonStyles(); if (MainWindow.Settings.Advanced.IsEnableAvoidFullScreenHelper) { + // 设置为画板模式,允许全屏操作 + AvoidFullScreenHelper.SetBoardMode(true); _dispatcher.BeginInvoke(new Action(() => { MainWindow.MoveWindow(new WindowInteropHelper(_mainWindow).Handle, 0, 0, @@ -114,11 +116,16 @@ namespace Ink_Canvas.Helpers HideAllNavigationPanels(); if (MainWindow.Settings.Advanced.IsEnableAvoidFullScreenHelper) { + // 恢复为非画板模式,重新启用全屏限制 + AvoidFullScreenHelper.SetBoardMode(false); + _dispatcher.BeginInvoke(new Action(() => { - MainWindow.MoveWindow(new WindowInteropHelper(_mainWindow).Handle, 0, 0, - System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width, - System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height, true); + // 退出PPT放映模式,恢复到工作区域大小 + var workingArea = System.Windows.Forms.Screen.PrimaryScreen.WorkingArea; + MainWindow.MoveWindow(new WindowInteropHelper(_mainWindow).Handle, + workingArea.X, workingArea.Y, + workingArea.Width, workingArea.Height, true); }), DispatcherPriority.ApplicationIdle); } }