@@ -1014,6 +1014,7 @@ protected virtual void FileList_DragItemsStarting(object sender, DragItemsStarti
10141014 e . Data . SetStorageItems ( storageItemList , false ) ;
10151015 }
10161016
1017+ // Set can window to front (#13255)
10171018 MainWindow . Instance . SetCanWindowToFront ( false ) ;
10181019 itemDragging = true ;
10191020 }
@@ -1025,9 +1026,9 @@ protected virtual void FileList_DragItemsStarting(object sender, DragItemsStarti
10251026
10261027 protected virtual void FileList_DragItemsCompleted ( ListViewBase sender , DragItemsCompletedEventArgs args )
10271028 {
1029+ // Set can window to front (#13255)
10281030 itemDragging = false ;
10291031 MainWindow . Instance . SetCanWindowToFront ( true ) ;
1030- // No need to bring the window to the front
10311032 }
10321033
10331034 private void Item_DragLeave ( object sender , DragEventArgs e )
@@ -1159,9 +1160,9 @@ protected void FileList_ContainerContentChanging(ListViewBase sender, ContainerC
11591160 RefreshContainer ( args . ItemContainer , args . InRecycleQueue ) ;
11601161 RefreshItem ( args . ItemContainer , args . Item , args . InRecycleQueue , args ) ;
11611162
1163+ // Set can window to front (#13255)
11621164 itemDragging = false ;
11631165 MainWindow . Instance . SetCanWindowToFront ( true ) ;
1164- // No need to bring the window to the front
11651166 }
11661167
11671168 private void RefreshContainer ( SelectorItem container , bool inRecycleQueue )
@@ -1216,7 +1217,7 @@ private void RefreshItem(SelectorItem container, object item, bool inRecycleQueu
12161217
12171218 protected internal void FileListItem_PointerPressed ( object sender , PointerRoutedEventArgs e )
12181219 {
1219- // Set can window to front and bring the window to the front if necessary
1220+ // Set can window to front and bring the window to the front if necessary (#13255)
12201221 if ( ( ! itemDragging ) && MainWindow . Instance . SetCanWindowToFront ( true ) )
12211222 Win32Helper . BringToForegroundEx ( new ( MainWindow . Instance . WindowHandle ) ) ;
12221223
@@ -1245,7 +1246,7 @@ protected internal void FileListItem_PointerPressed(object sender, PointerRouted
12451246
12461247 protected internal void FileListItem_PointerEntered ( object sender , PointerRoutedEventArgs e )
12471248 {
1248- // Set can window to front before the item is dragged
1249+ // Set can window to front (#13255)
12491250 if ( sender is SelectorItem selectorItem && selectorItem . IsSelected )
12501251 MainWindow . Instance . SetCanWindowToFront ( false ) ;
12511252
@@ -1295,7 +1296,7 @@ selectedItems is not null &&
12951296
12961297 protected internal void FileListItem_PointerExited ( object sender , PointerRoutedEventArgs e )
12971298 {
1298- // Set can window to front
1299+ // Set can window to front (#13255)
12991300 if ( ! itemDragging )
13001301 MainWindow . Instance . SetCanWindowToFront ( true ) ;
13011302
@@ -1308,21 +1309,21 @@ protected internal void FileListItem_PointerExited(object sender, PointerRoutedE
13081309
13091310 protected void FileListItem_Tapped ( object sender , TappedRoutedEventArgs e )
13101311 {
1311- // Set can window to front and bring the window to the front if necessary
1312+ // Set can window to front and bring the window to the front if necessary (#13255)
13121313 if ( ( ! itemDragging ) && MainWindow . Instance . SetCanWindowToFront ( true ) )
13131314 Win32Helper . BringToForegroundEx ( new ( MainWindow . Instance . WindowHandle ) ) ;
13141315 }
13151316
13161317 protected void FileListItem_DoubleTapped ( object sender , DoubleTappedRoutedEventArgs e )
13171318 {
1318- // Set can window to front and bring the window to the front if necessary
1319+ // Set can window to front and bring the window to the front if necessary (#13255)
13191320 if ( ( ! itemDragging ) && MainWindow . Instance . SetCanWindowToFront ( true ) )
13201321 Win32Helper . BringToForegroundEx ( new ( MainWindow . Instance . WindowHandle ) ) ;
13211322 }
13221323
13231324 protected void FileListItem_RightTapped ( object sender , RightTappedRoutedEventArgs e )
13241325 {
1325- // Set can window to front and bring the window to the front if necessary
1326+ // Set can window to front and bring the window to the front if necessary (#13255)
13261327 if ( ( ! itemDragging ) && MainWindow . Instance . SetCanWindowToFront ( true ) )
13271328 Win32Helper . BringToForegroundEx ( new ( MainWindow . Instance . WindowHandle ) ) ;
13281329
0 commit comments