Preview window takes focus from Voidtools

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

Preview window takes focus from Voidtools

Post by mrfex »

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: 5
Joined: Sun Feb 03, 2019 2:38 pm

Re: Preview window takes focus from Voidtools

Post by mrfex »

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
Developer
Posts: 16753
Joined: Fri Oct 16, 2009 11:31 pm

Re: Preview window takes focus from Voidtools

Post by void »

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: 5
Joined: Sun Feb 03, 2019 2:38 pm

Re: Preview window takes focus from Voidtools

Post by mrfex »

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
Developer
Posts: 16753
Joined: Fri Oct 16, 2009 11:31 pm

Re: Preview window takes focus from Voidtools

Post by void »

Glad to hear Everything is working.

Thanks for your support.
Post Reply