-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move focus to main window of process if it's already running #49
base: develop
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jonstodle Left some comments.
@@ -55,7 +59,33 @@ protected override Task ExecuteAsync(FileResult result) | |||
|
|||
if (result.Path.Scheme == "shell") | |||
{ | |||
Process.Start(path); | |||
var descriptionPath = result.Description.Replace("/", "\\"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using the FileResult.Description
only works in some cases. Where a lnk
-file has been indexed, this will be the shortcut's description.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that's what I feared.
src/Jarvis.Core/Interop/Kernel32.cs
Outdated
|
||
namespace Jarvis.Core.Interop | ||
{ | ||
public static class Kernel32 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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