- attached hittest.patch
Windows 11のスナップ レイアウト機能が使用できない
Issue #1183
closed
NeeViewの最大化ボタンにホバーした際、Windows 11の機能であるスナップ レイアウトが表示されません。
参考: Windows 11 上でデスクトップ アプリのスナップ レイアウトをサポート - Windows apps | Microsoft Docs
Comments (9)
-
reporter -
repo owner ご報告ありがとうございます。対応を検討します。
-
repo owner - changed status to resolved
Windows11 のスナップレイアウトに対応 (fixed
#1183)→ <<cset 8ad034e91c20>>
-
reporter 対応お疲れ様です。
手元で修正済みのブランチ c75c214070ad7638152b16fa6636eb79f8e9d9e5 をビルドして起動したところ、起動直後にエラーになりました。
OS Version: Microsoft Windows NT 10.0.22621.0 (64bit) NeeView Version: 39.4 (.dev) System.InvalidOperationException: This Visual is not connected to a PresentationSource. at System.Windows.Media.Visual.PointToScreen(Point point) at NeeView.Windows.Controls.SnapLayoutPresenter.HitTest(FrameworkElement element, IntPtr lParam) in D:\tmp\NeeView\NeeView.Runtime\NeeView\Windows\Controls\SnapLayoutPresenter.cs:line 141 at NeeView.Windows.Controls.SnapLayoutPresenter.OnNCHitTest(IntPtr lParam, Boolean& handled) in D:\tmp\NeeView\NeeView.Runtime\NeeView\Windows\Controls\SnapLayoutPresenter.cs:line 89 at NeeView.Windows.Controls.SnapLayoutPresenter.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) in D:\tmp\NeeView\NeeView.Runtime\NeeView\Windows\Controls\SnapLayoutPresenter.cs:line 68 at System.Windows.Interop.HwndSource.PublicHooksFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o) at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs) at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler) at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs) at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
[メニューを自動的に隠す] をONにしていると発生しているように思えます。
-
reporter if (!element.IsVisible) { return false; } // ...
のようなガードが必要かもしれません。
-
repo owner ご報告ありがとうございます。修正します。
-
repo owner - changed status to open
-
repo owner - changed status to resolved
メニューを自動非表示にしたときにエラーになることがある不具合修正 (fixed
#1183)→ <<cset 6c90ec872cfd>>
-
repo owner - changed status to closed
- Log in to comment
手元で修正したところ、スナップレイアウト機能は使えるようになりましたが、最大化ボタンをクリックした時に一瞬表示がおかしくなってしまいました(OS側の最大化ボタンが表示されている?)
ご参考までに。