Skip to content

Commit

Permalink
Merge pull request #412 from Noisrev/fix-drag
Browse files Browse the repository at this point in the history
Fix a issue where the dragged window still appeared above the overlay window
  • Loading branch information
Dirkster99 authored Dec 25, 2022
2 parents 4bcb11b + 6541b1e commit 267e2ae
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions source/Components/AvalonDock/Controls/DragService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ internal void UpdateMouseLocation(Point dragPosition)
if (_currentDropTarget != null)
{
_currentWindow.DragEnter(_currentDropTarget);
BringWindowToTop2((Window)_currentWindow);
return;
}
});
Expand Down Expand Up @@ -278,6 +279,8 @@ internal void Abort()

private void BringWindowToTop2(Window window)
{
if (window == null) return;

Win32Helper.SetWindowPos(new WindowInteropHelper(window).Handle,
IntPtr.Zero, 0, 0, 0, 0, Win32Helper.SetWindowPosFlags.IgnoreResize | Win32Helper.SetWindowPosFlags.IgnoreMove | Win32Helper.SetWindowPosFlags.DoNotActivate);
}
Expand Down

0 comments on commit 267e2ae

Please # to comment.