From 84083ecdd31d3a4a266c961e4443ece05203efed Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 13 Feb 2014 13:08:08 -0400 Subject: [PATCH] Windows: Crazy hack to make file manager not start hidden underneath web browser window I can't even.. --- Assistant/WebApp/DashBoard.hs | 17 ++++++++++++++++- doc/todo/windows_support.mdwn | 2 ++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/Assistant/WebApp/DashBoard.hs b/Assistant/WebApp/DashBoard.hs index b33919b347..718021b0e1 100644 --- a/Assistant/WebApp/DashBoard.hs +++ b/Assistant/WebApp/DashBoard.hs @@ -130,8 +130,23 @@ openFileBrowser = do #endif ifM (liftIO $ inPath cmd) ( do - void $ liftIO $ forkIO $ void $ + let run = void $ liftIO $ forkIO $ void $ boolSystem cmd params + run +#ifdef mingw32_HOST_OS + {- On windows, if the file browser is not + - already open, it comes up below the + - web browser when started. + - + - Running it a second time brings it + - to the foreground. + - + - Seems to need a delay long enough for the file + - browser to be open in order to work. Here 1 + - second. -} + liftIO $ threadDelay 1000000 + run +#endif return True , do void $ redirect $ "file://" ++ path diff --git a/doc/todo/windows_support.mdwn b/doc/todo/windows_support.mdwn index 9eede4d20c..c19d7068a2 100644 --- a/doc/todo/windows_support.mdwn +++ b/doc/todo/windows_support.mdwn @@ -52,6 +52,8 @@ now! --[[Joey]] there. * Deleting a git repository from inside the webapp fails "RemoveDirectory permision denined ... file is being used by another process" +* Shutting down the webapp does not stop the daemon; the ctrl-c hack + doesn't work. ## stuff needing testing