node-window-manager
node-window-manager copied to clipboard
`window.getTitle` doesn't work on macOS Catalina
Bug description
window.getTitle
method doesn't work on macOS Catalina, because now it requires some desktop capturer permissions.
Details:
- Operating System: macOS Catalina
-
node-window-manager
version: 2.0.0 - Last known working
node-window-manager
version: none
As a workaround, request permission using https://github.com/karaggeorge/mac-screen-capture-permissions first.
@sentialx still I am facing this issue with my electron app on MAC.
BTW, PR #51 fixed a segmentation fault, but now getTitle() does not return the window title anymore, but instead the Application name.
@mattallty I can confirm that window.getTitle
is not working as expected in v2.2.4. Using macOS Big Sur. I'm sticking to v2.2.3 because of it.
BTW, PR #51 fixed a segmentation fault, but now getTitle() does not return the window title anymore, but instead the Application name.
try to change file macos.mm
NSString *windowName = wInfo[(id)kCGWindowOwnerName]; to NSString *windowName = wInfo[(id)kCGWindowName];
after that recompile it.
@DYGidin This was exactly what I needed. In dev, I had to manually grant permissions to VSCode, but it's working excellently after applying that change. Thanks!