uiohook-napi
uiohook-napi copied to clipboard
Update patch to fix libuiohook hanging on Mac
Motivation/Fix
awakened-poe-trade on Mac would hang after running a while. I debugged it and submitted a PR to libuiohook, which has more details:
https://github.com/kwhat/libuiohook/pull/184
This PR just includes that change as a patch.
Alternatively, we can also wait for libuiohook to merge in the PR and then just update the version.
Testing
# Build the branch
git clone [email protected]:hsource/uiohook-napi.git --recursive
cd uiohook-napi
git checkout harry-patch-mac
yarn install
yarn apply-libuiohook-patch
yarn prebuild
# Install in awakened-poe-trade
git clone [email protected]:SnosMe/awakened-poe-trade.git
cd awakened-poe-trade/renderer
yarn install
yarn make-index-files
yarn build
cd ../main
yarn install
yarn remove uiohook-napi && yarn add ../../uiohook-napi
yarn build
yarn package
I then used it until I got the "CGEventTap timeout" error and verified events still worked after that
@hsource Is this PR still needed given https://github.com/kwhat/libuiohook/pull/184 is merged? uiohook-napi is also released https://www.npmjs.com/package/uiohook-napi/v/1.5.3 it seems.
Can you please suggest if your new fix addresses https://github.com/SnosMe/uiohook-napi/issues/24 too?