-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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
N++ (run as administrator) minimized window doesn't restore when opening a file using the “Edit with Notepad++” context menu option #13041
Comments
In step 3, where is this right-clicked file originating? Consider drag-and-drop of a file from a "non-admin" Explorer instance to an "admin" Notepad++ instance -- it doesn't work (because the permissions are different). |
Yeah, just tested it and it's just as you say (meaning the drag-and-drop feature doesn't work if Notepad++ is run as an administrator on non-Super Administrator account; not sure though what you mean by |
I meant, e.g. if you are dragging from an Explorer window that is not run-as-admin, and you try dropping into an admin N++ window, it won't work. Drag and drop admin-to-admin should work, however, I'd think, hmm. But you're right, that isn't the issue you're describing. I wasn't saying it was, I was just wondering if some of the same elements were coming into play for your issue.
Well, unless the bug you describe shouldn't happen because it shouldn't even get that far (meaning a bug happens before your described bug). I'm not a permissions expert, I was just curious what permission level the "Edit with Notepad++" thing runs at. If it is coming from an Explorer window, it's got to be the same as that instance of Explorer. I'll move on, now. :-) |
I've tested it with different Windows permissions, and could reproduce it. |
@donho Easy enough to fix, adding // Allow non admin NP++ to send this message to admin NP++ mono instance
ChangeWindowMessageFilter( NPPM_INTERNAL_RESTOREMONOINSTANCE, MSGFLT_ADD ); Somewhere in WinMain (for example in |
@przemo20 This was what I was getting at. |
…mode Regression is due to: notepad-plus-plus@afacc83 Fix notepad-plus-plus#13041
I cannot reproduce the bug, but in admin mode when Notepad++ is reduced in system tray, open a file via "Edit with Notepad++", I've got Notepad++ opened with the file, but opened panel is disappeared. I followed the suggestion of @robotboy655 in #13058 and my problem has been fixed. Could you guys confirm me that #13058 has fixed your bug as well please? (Copying the binary into |
Unfortunately #13058 does not fix the issue.
I'm using the portable version, and I've manually associated some files with NPP. Here are my STR: Result: I suppose it can be reproduced on Windows 10 as well (with "normal permissions"). Thank you for your work. I appreciate it. 👍 Notepad++ v8.4.9 (32-bit) |
@Yaron10 |
The new commit does fix the issue. 👍 Actually, just moving That is, the only change to afacc83 can be removing What do you think? Thank you. Could you please test the binary in https://ci.appveyor.com/project/donho/notepad-plus-plus/builds/46146526/job/5ft8k80cr1q65onb/artifacts on your machine? This might be important: Thank you. |
Err... for me is the other way around (or I'm doing something wrong; also I can't redowload the files to check them again, because of the 1st fix (64-bit; Release) Build time : Feb 6 2023 - 00:10:55 |
Thank you for testing and replying. I just want to make sure: the problem does NOT occur with Notepad++ v8.4.8, does it? |
for me the first worked, second I cannot test, because of "Artifacts download limit (1024 MB/day) exceeded" error. Interesting is that I have to renamed it to "notepad++.exe" if I have another notepad++ in different location, and it is already opened and minimized to bring it foreground. If not renamed it stay minimized but tab is opened. |
Same question to you: did you have any problem with Notepad++ v8.4.8? |
|
Seems like this was a problem always. I have installed the version 8.4.8 on a Win 10 VM and this doesn't work either. Then tried version 8.4.7, 7.5.6 and 6.2.3 – still nothing. |
@Yaron10 |
Is it likely you would not have noticed such a problem earlier?
Did you still have v8.4.9 on that machine? |
Yes, that's correct. About 2 weeks ago I switched from Windows 7 to Windows 10 and I started seeing this problem after setting Notepad++ shortcut to always run with administrator privileges. On Windows 7 I have had UAC disabled so I didn't need to do this – Notepad++, explorer.exe, cmd etc. were always starting as an administrator.
I uninstalled v8.4.9 before installing v8.4.8. |
@Yaron10 |
I have no idea about the 2nd eventual issue. I have had the bring foreground issue (cannot reproduce steadily though) and Panel disappear issue (with tray). |
👍 |
Hi. Could you reopen this issue as it wasn't fixed? I still can reproduce it in Notepad++ v8.5. As I already stated in one of my previous comments (#13041 (comment)), the first fix from Don (donho@adb2c7f) fixed the issue for me. Here're some alternative steps to reproduce the issue (maybe those will be easier). Alternative Steps to Reproduce the Issue
Video: https://www.youtube.com/watch?v=BZBOjsw5X7Q Debug Information (from the VM that I recorded the above video)
|
I can confirm the issue persists in v8.5.1. I have done the same steps as @przemo20, and got the same result.
|
Description of the Issue
If you open Notepad++ as an administrator, minimize it, right-click on any file and choose the “Edit with Notepad++” context menu option, you will see in the Windows taskbar that Notepad++ window is now active, but it didn't get restored. You have to click on the Notepad++ icon to bring up its window to see the file you just opened. This works normally if you run N++ WITHOUT admin rights.
Video: https://www.youtube.com/watch?v=AxUyqAJEk0k
Steps to Reproduce the Issue
Expected Behavior
After selecting the “Edit with Notepad++” option, Notepad++ window should be set to active and open up.
Actual Behavior
After selecting the “Edit with Notepad++” option, Notepad++ window gets set to active, BUT doesn't open up.
Debug Information
The text was updated successfully, but these errors were encountered: