Focus does not return to previous app when closing
-
HI. Notepad++ is an excellent editor and very useful. However a bug has crept in in recent releases and nothing seems to repair it.
That is application focus.
For example, I have windows explorer open and click on a text ie .txt file to open it in notepad++. All good and notepad++ opens with the file displayed for editing or review. Now close Notepad++ and it closes. However focus does NOT return to windows explorer to continue scrolling up and down the file list. It is not the focused application anymore.
For anyone trying to use the keyboard the small problem is a major one.
Notepad++ version 6.6 DOES work correctly. From then on all versions appear to have lost the ability to return focus to the previous application.
Is there any settings option or other tricks that might address this?
thanks for helping.
-
@minsikau
afaik windows has the responsibility to give the focus to the topmost window, not npp.Cheers
Claudia -
Appreciate the help Claudia. Can you suggest how to return the focus to the previous program on closing Notepad++ ?? That would be appreciated to solve this riddle.
-
So, taking your example, when you use explorer to look for a file and double click it to start vieweing/editing in npp, explorer gets the
focus once npp is closed only if there wasn’t any other program used in between.
Let’s make some timeline to make it clear- open explorer
- looking for a specific file
- double click on that file
- npp starts and shows that file
now comes the interesting part. as long as you exclusively use npp and no other program, like friefox or chrome to search for something
is used, or start vlc to listen to music etc… then when
5. close npp
6. explorer gets focused. But if you used any other program before closing npp, this gets focused.The way to get the explorer focused again by using the keyboard is to press ALT+TAB and choose the program you are looking for.
Cheers
Claudia -
Thanks for the help.
@Claudia-Frank said:
So, taking your example, when you use explorer to look for a file and double click it to start vieweing/editing in npp, explorer gets the
focus once npp is closed only if there wasn’t any other program used in between.
Let’s make some timeline to make it clear- open explorer
- looking for a specific file
- double click on that file
- npp starts and shows that file – Yes all good so far…
now comes the interesting part. as long as you exclusively use npp and no other program, like friefox or chrome to search for something
is used, or start vlc to listen to music etc… then when
5. close npp
6. explorer gets focused. But if you used any other program before closing npp, this gets focused.The way to get the explorer focused again by using the keyboard is to press ALT+TAB and choose the program you are looking for.
Cheers
Claudia#6 is the problem but only with Npp.
Here is the problem. No other program is used after starting Npp and still Npp is not returning focus to previous window! If i use notepad.exe that all works back to previous window. If I use wordpad.exe that returns to the previous window. Just Notepad++ does not return to previous window. There does not appear to be any other program active that could take the focus. As I said other programs work fine, they return the focus on closing to the previous window. its jyst Npp that does not return focus leaving the focus in limbo land.I want to have the same action on closing the Npp program as occurs for other programs ie image viewers, editors returning to the previous program.
I wonder to try portable version might be different test?
-
That doesn’t make sense to me. If only explorer and npp are active and you close npp, then the only remaining program
is explorer and windows would give it the focus. Strange. How do you close npp?
Btw. I tested it with a zip version and an installed on, I don’t have that behaviour yet.Cheers
Claudia -
Many thanks again for help. Yes no sense to me either!
I have just tried the 7z package and extracted that to a directory then run notepad++.exe. When closing either by file, exit or alt+f4 this DOES return focus back to the directory so i can just arrow up or down to move down the files listing. If I drag the readme.txt file onto notepad++.exe it opens that file in that program and has focus. all good. Now close by either file, exit or alt+f4 and program closes with focus returning to the previous directory where the next up/down arrow will scroll up or down the files. Yes Yea that works.
The installed Notepad++ does not do this.
Now I will removed Notepad++ via the programs installed section and see if I can get it to work with just the download 7z file directory that i unzipped created.
Interesting the c:\program files\Notepad++ directory wont allow deletion due to a file “nppshel05.dll” appearing to be still active. Even though Notepad++ has been uninstalled and is not running.Now that I have a fix by using the non installed version I wonder why the installed version is not working properly for me.
Windows 10 64bit 1511 OS I am administrator mode and no UAC in force.
Only thing I now have to do manyal intergration of Notepad++ to get the rightclick open with for txt files back again!
At least there is a way forward as this was driving me quite crazy!
-
This is more than strange!
Having got Notepad ++ working with a portable install and manually setup the file associations where all open and close focus was now working in either Windows Explorer or freecommander. I had some trouble getting explorer right click menu for unregistered files but persevered and it worked.
I decided to remove all and start from scratch with a normal install.
Installed and checked 6.8.8 installation and blow me down its now working as expected. There must have been a corruption and remove and install which had not fixed before did restore the correct settings on the final install.
Raises the question is there a program uninstaller that would remove all Notepad++ registration and other OS intergrations if this were to happen again?
Thanks again for all helping to resolve what was frustrating…
-
Unhappy me its back again except I tracked all changes as I did them in all installation steps and changes to any config!
Phew…Problem now repeatable and known. Tracked down to plugin=compare. Remove plugin and no problem, install plugin and problem exists.
-
Hello minsikau,
phew, good to see that you found the reason for your strange problem but
I have compare plugin also installed and I don’t have that behaviour.
Must be some strange coincedents.Cheers
Claudia -
I have now used the compare 1.5.6.7 without any problem, as compared to the plugin manager normal download. Now it works as it is supposed to and a big relief.
Why is it simple things get overlooked. Thanks for help resolving.