Move focus to main window of process if it's already running#49
Move focus to main window of process if it's already running#49jonstodle wants to merge 8 commits into
Conversation
Move focus to main window of process if it's already running
patriksvensson
left a comment
There was a problem hiding this comment.
@jonstodle Left some comments.
| if (result.Path.Scheme == "shell") | ||
| { | ||
| Process.Start(path); | ||
| var descriptionPath = result.Description.Replace("/", "\\"); |
There was a problem hiding this comment.
Using the FileResult.Description only works in some cases. Where a lnk-file has been indexed, this will be the shortcut's description.
|
|
||
| namespace Jarvis.Core.Interop | ||
| { | ||
| public static class Kernel32 |
There was a problem hiding this comment.
Would prefer to put this in public static partial class Win32 and name the file Win32.Process or similar.
This issue is caused by `AllowsTransparency="True"` More info: https://blog.magnusmontin.net/2016/07/07/enabling-cleartype-on-a-textbox-in-a-transparent-wpf-window/
* Set folders to index and exclude from indexing. * Allow indexing of specific extensions only. * Ignore hidden files and system files. Closes spectresystems#43
to prevent flickering the window on startup
|
Well.. That's not exactly what I intended to do. Sorry about this. I'm not too experienced at PRs on Github 😞 I have made a few changes. I'm most curious what you think about the change in |
|
|
This is just the initial work, but I want to get your feedback before I might head far off in the wrong direction.
This code will move focus to the first process which has the same file name as the
FileResult.Description. If the window is minimized, it will restore it.I haven't checked if this will work with UWP apps yet. I started by checking if I could get the easy problem to work first.
This will close #38