Preview window takes focus from Voidtools

If you are experiencing problems with "Everything", post here for assistance.
Post Reply
mrfex
Posts: 3
Joined: Sun Feb 03, 2019 2:38 pm

Preview window takes focus from Voidtools

Post by mrfex » Sun Feb 03, 2019 2:52 pm

Hi there,

I've created a preview handler for certain text extensions and I have a strange symptom. My handler is very straightforward and only contains a TextBox that displays the filename. Sometimes when I navigate through the search results list the focus is changed to the preview pane. This messes up my ability to navigate the search results using the arrow keys. Most of the time it is fixed by either closing the window or closing the preview.

I've read another thread about some changes in Everything regarding setting focus to the preview window:
viewtopic.php?t=5548

In Windows explorer I don't have any issues with my handler.

Any idea if this is due to my IPreviewHandler or something in Everything?

mrfex
Posts: 3
Joined: Sun Feb 03, 2019 2:38 pm

Re: Preview window takes focus from Voidtools

Post by mrfex » Sun Feb 03, 2019 3:01 pm

Also .. I'm using the latest version on Windows 10 with x64. I've also tested x86 which has the same problem. I've also tested with another PreviewHandler which I downloaded from the internet and it also appears to have the same issue.

Thanks

void
Site Admin
Posts: 4767
Joined: Fri Oct 16, 2009 11:31 pm

Re: Preview window takes focus from Voidtools

Post by void » Mon Feb 04, 2019 5:56 am

Thanks for the bug report.

Are you calling ShowWindow after creating your preview window?
-Please try avoiding ShowWindow and creating your window with the WS_VISIBLE bit set, or use ShowWindow with one of the no-active flags, such as SW_SHOWNA

Are you calling SetWindowPos, specifically in your preview handlers SetRect method?
-Please make sure you use the SWP_NOZORDER flag and the SWP_NOACTIVATE flag.

If you change the focus to the Everything search edit or result list, does resizing the preview window move the focus back to the preview?

Could you please try running Everything in debug mode, there is some information shown when the preview requests focus:
In Everything, type in the following search and press ENTER:
/debug
Look for the following lines in the debug console:
SetFocus child
SetFocus OK
SetFocus failed

mrfex
Posts: 3
Joined: Sun Feb 03, 2019 2:38 pm

Re: Preview window takes focus from Voidtools

Post by mrfex » Fri Mar 01, 2019 9:27 pm

Yes. I was calling ShowWindow without the correct flags. Thanks you very much. Also I apologize for the delay but I didn't get around to it and needed some time to test. It seems to work perfectly now! Thanks a million for this amazing piece of software. I recommend it Everywhere :lol:

void
Site Admin
Posts: 4767
Joined: Fri Oct 16, 2009 11:31 pm

Re: Preview window takes focus from Voidtools

Post by void » Fri Mar 01, 2019 11:06 pm

Glad to hear Everything is working.

Thanks for your support.

Post Reply