File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,8 @@ public class SeerProProvider : IPreviewPopupProvider
1818 {
1919 public static SeerProProvider Instance { get ; } = new ( ) ;
2020
21+ private string ? CurrentPath ;
22+
2123 public async Task TogglePreviewPopup ( string path )
2224 {
2325 HWND Window = User32 . FindWindow ( "SeerWindowClass" , null ) ;
@@ -26,11 +28,14 @@ public async Task TogglePreviewPopup(string path)
2628 data . cbData = ( path . Length + 1 ) * 2 ;
2729 data . lpData = Marshal . StringToHGlobalUni ( path ) ;
2830 User32 . SendMessage ( Window , ( uint ) User32 . WindowMessage . WM_COPYDATA , 0 , ref data ) ;
31+
32+ CurrentPath = User32 . IsWindowVisible ( Window ) ? path : null ;
2933 }
3034
3135 public async Task SwitchPreview ( string path )
3236 {
33- // TODO
37+ if ( CurrentPath is not null && path != CurrentPath )
38+ await TogglePreviewPopup ( path ) ;
3439 }
3540
3641 public async Task < bool > DetectAvailability ( )
You can’t perform that action at this time.
0 commit comments