NotepadNext icon indicating copy to clipboard operation
NotepadNext copied to clipboard

[MAC] Double-click to open a file and cannot activate the minimized NN window

Open ErickWei opened this issue 1 year ago • 5 comments

When NN is already open and minimized, double-clicking another file will not wake up NN. The NN window needs to be restored manually, then the file will be imported by NN.

Kapture 2024-04-07 at 12.36.39.webm

ErickWei avatar Apr 07 '24 04:04 ErickWei

But on windows,is another issue. When NN is already open and minimized, double-clicking another file can activate NN window,but the file not loaded at all.

ErickWei avatar Apr 07 '24 04:04 ErickWei

When NN is already open and minimized, double-clicking another file can activate NN window,but the file not loaded at all.

It is working fine for me. I'm on Windows 11, master branch, using Qt6.5.3

dail8859 avatar Apr 07 '24 14:04 dail8859

Mac works a bit differently when opening files. It send an event to the application and is handled here:

https://github.com/dail8859/NotepadNext/blob/77d093232016a1b2777b8ed14752c08dfc85b7f0/src/NotepadNext/NotepadNextApplication.cpp#L468-L477

And again the bringWindowToForeground() method might need updated as well, but it is weird it is not receiving the request to open the file.

dail8859 avatar Apr 07 '24 14:04 dail8859

Windows server 2022,NN is the last release version.

Kapture 2024-04-08 at 08.33.21.webm

When NN is already open and minimized, double-clicking another file can activate NN window,but the file not loaded at all.

It is working fine for me. I'm on Windows 11, master branch, using Qt6.5.3

ErickWei avatar Apr 08 '24 00:04 ErickWei

Windows server 2022,NN is the last release version.

That is very odd. Not sure if the debug logs points to any indication of the cause...or if more debug info needs added to that part of the application to help. The third party library used for that SingleApplication is likely the cause but I cannot say that for certain.

dail8859 avatar Apr 08 '24 12:04 dail8859