File tree Expand file tree Collapse file tree 1 file changed +13
-4
lines changed
source/Components/Xceed.Wpf.AvalonDock Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ This program is provided to you under the terms of the Microsoft Public
30
30
using System . Windows . Data ;
31
31
using System . Windows . Threading ;
32
32
using Xceed . Wpf . AvalonDock . Themes ;
33
+ using System . Diagnostics ;
33
34
34
35
namespace Xceed . Wpf . AvalonDock
35
36
{
@@ -2207,12 +2208,20 @@ internal void StartDraggingFloatingWindowForPane( LayoutAnchorablePane paneModel
2207
2208
2208
2209
internal IEnumerable < LayoutFloatingWindowControl > GetFloatingWindowsByZOrder ( )
2209
2210
{
2211
+ IntPtr windowParentHanlde ;
2210
2212
var parentWindow = Window . GetWindow ( this ) ;
2213
+ if ( parentWindow != null )
2214
+ {
2215
+ windowParentHanlde = new WindowInteropHelper ( parentWindow ) . Handle ;
2216
+ }
2217
+ else
2218
+ {
2219
+ var mainProcess = Process . GetCurrentProcess ( ) ;
2220
+ if ( mainProcess == null )
2221
+ yield break ;
2211
2222
2212
- if ( parentWindow == null )
2213
- yield break ;
2214
-
2215
- IntPtr windowParentHanlde = new WindowInteropHelper ( parentWindow ) . Handle ;
2223
+ windowParentHanlde = mainProcess . MainWindowHandle ;
2224
+ }
2216
2225
2217
2226
IntPtr currentHandle = Win32Helper . GetWindow ( windowParentHanlde , ( uint ) Win32Helper . GetWindow_Cmd . GW_HWNDFIRST ) ;
2218
2227
while ( currentHandle != IntPtr . Zero )
You can’t perform that action at this time.
0 commit comments