{"_id":"@loomhq/electron-click-through-workaround","_rev":"236-24097ff523c86cd346e871fa65398a49","name":"@loomhq/electron-click-through-workaround","dist-tags":{"latest":"0.0.1"},"versions":{"0.0.1":{"name":"@loomhq/electron-click-through-workaround","version":"0.0.1","license":"UNLICENSED","_id":"@loomhq/electron-click-through-workaround@0.0.1","maintainers":[{"name":"angelaliu","email":"angela@loom.com"},{"name":"peter.heesterman","email":"heesterman.peter@gmail.com"},{"name":"vladloom","email":"vlad@loom.com"},{"name":"solidcell","email":"solidcell@gmail.com"},{"name":"premaloom","email":"prema@loom.com"},{"name":"mkrufky","email":"mkrufky@gmail.com"},{"name":"jmreidy","email":"jmreidy@gmail.com"},{"name":"irisloom","email":"iris@loom.com"},{"name":"azacharakis","email":"anthonyzacharakis@gmail.com"},{"name":"vinibaggio","email":"vinibaggio@gmail.com"},{"name":"swac","email":"me@ashwinbhat.com"},{"name":"hamzakubba","email":"hamzakubba@gmail.com"},{"name":"sravanti","email":"sravanti@loom.com"},{"name":"tiffyork","email":"tiffany@loom.com"},{"name":"harrisrasheed123","email":"harris@loom.com"},{"name":"shayonj","email":"shayon@loom.com"},{"name":"gchilds","email":"gordon.childs@gmail.com"},{"name":"fgwuuei1","email":"marcin@loom.com"},{"name":"luis.loom","email":"luis@loom.com"},{"name":"hspak","email":"npm@hspak.com"},{"name":"avanika","email":"avakrishn@gmail.com"},{"name":"msfragala","email":"ms.fragala@gmail.com"},{"name":"acacheung","email":"acacheung@gmail.com"},{"name":"yjaspar","email":"yjaspar@gmail.com"},{"name":"josecarlosatloom","email":"josecarlos@loom.com"},{"name":"ydep","email":"yael@loom.com"},{"name":"nymerias","email":"nicolette@loom.com"},{"name":"diaswrd","email":"wrddias@gmail.com"},{"name":"cacheonly","email":"donhuh@gmail.com"},{"name":"loom.embed-sdk","email":"brendon+embed-sdk@loom.com"},{"name":"brhenrique","email":"bruno@loom.com"},{"name":"stevemilburn","email":"scmilburn@gmail.com"},{"name":"brendonjohn","email":"brendonmuschamp+npm@gmail.com"},{"name":"hihayk","email":"say@hihayk.com"},{"name":"ploom","email":"paulius@loom.com"},{"name":"garshythoel","email":"harshyt.goel@gmail.com"},{"name":"vinayh","email":"vinay@loom.com"},{"name":"keepitterron","email":"raptxt@gmail.com"},{"name":"johnnyopao","email":"johnnyopao@gmail.com"}],"homepage":"https://github.com/loomhq/ElectronMacOSClickThrough#readme","bugs":{"url":"https://github.com/loomhq/ElectronMacOSClickThrough/issues"},"dist":{"shasum":"9116a3fac783d57400153db1ea92c2ced3f283fa","tarball":"https://registry.npmjs.org/@loomhq/electron-click-through-workaround/-/electron-click-through-workaround-0.0.1.tgz","fileCount":13,"integrity":"sha512-QRcikfZwZ/96r4LD7c/9TD68jUx9UG+ctilILTdY52q6cJO1xhebUWFZ+pO8t9/snxnye9bvB52hNO5PR8vNzw==","signatures":[{"sig":"MEQCIC+7EtMuIrGtO7NDUzxV2hekd80CMIanGSxBvTY8bEkaAiA0f/0kZIJUKpbXEUT8dNJeTIZKp5Pm+GqrbzHhHHohVA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":374084,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfxsK7CRA9TVsSAnZWagAAW7sP/igV9Ijvnn+QveKoOa3L\nIeqi11/AMNLTEcK7SFTl53pWHTjQ0Q/pZTtuB7kNjEhNKSuE5jfoMF3WGo97\nWXZkluPEpdCjcgQj+/4Oi/f6FHPVoFRTdMHmHVfmqV0Lsht6cr6s3VU55Bja\nnEkTi1bYJLCTDKRfX/S8bcirDZcJaSDVwwrA0POu/cE23oShCyrcAzpAm3ys\nWmeUskKz0nDnNIpufyEBZPswPjA+QjpWB5T1v3zrQ1OBY3vQ7M8t/mr8E2+3\ncb883EUAO4FAZD/9Xn/SARnecJ+K5SO+HOpQjGvmWUP+QoCeVhV726SCSkUe\nsvwf6qpxPoKMq6+SmOVN4E3i99pzKjIxfUjcLziSAhFEKWWHXUVM+ayjqGFc\nAjX3i62d/BTaSWhijMz22TKdNcTGxzklSN2MGPhBbs2Y4yyWaIiNnHj0mI+d\nw72DHwOUu9asb0X4tn32fUr8ymCilzNe5C4S/0fvmX5YKRMD9GOiwpGHUIK6\nIhRfGSfZUdrvPl5L7QwYJye6DaC6Me3mmrQhZ9p7znjbtg/0PsM6CDkwQd84\nIh8dYE/oT0AfLoql+ZoZIlC1mJLyaGjU5P31Cv9m1YJvsB743zHEpMBSgmtQ\n7RDEKe6OUxUu4UruqUdg4wO9zNKP0ILd2RmmTE7SF3/Y+LiNWED7oBuk9eBM\n6xCa\r\n=biOp\r\n-----END PGP SIGNATURE-----\r\n"},"main":"main.js","gitHead":"fc445879db00fd87369636fef90f1aa77f8d4b08","gypfile":true,"scripts":{"build":"node-gyp build","clean":"node-gyp clean","install":"node-gyp rebuild","rebuild":"node-gyp clean; node-gyp configure; node-gyp build"},"_npmUser":{"name":"gchilds","email":"gordon.childs@gmail.com"},"deprecated":"Package moved to PAC","repository":{"url":"git+https://github.com/loomhq/ElectronMacOSClickThrough.git","type":"git"},"_npmVersion":"6.13.4","description":"mac work around for transparent click through on electron v7 and up","directories":{},"_nodeVersion":"12.16.1","dependencies":{"bindings":"~1.2.1","node-addon-api":"^3.0.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/electron-click-through-workaround_0.0.1_1606861499448_0.10290231507146519","host":"s3://npm-registry-packages"}}},"time":{"created":"2020-12-01T22:24:59.198Z","modified":"2025-01-29T20:12:55.885Z","0.0.1":"2020-12-01T22:24:59.594Z"},"bugs":{"url":"https://github.com/loomhq/ElectronMacOSClickThrough/issues"},"license":"UNLICENSED","homepage":"https://github.com/loomhq/ElectronMacOSClickThrough#readme","repository":{"url":"git+https://github.com/loomhq/ElectronMacOSClickThrough.git","type":"git"},"description":"mac work around for transparent click through on electron v7 and up","maintainers":[{"email":"eng-development-tooling-secrets-and-artifacts@atlassian.com","name":"atlassianartifactteam"}],"readme":"# Overview\n\nThis is an addon fix for window click through in transparent regions that was broken in electron 7.0.0beta5\nhttps://github.com/electron/electron/issues/23042#issuecomment-721474777\n\nBy default, a borderless `NSWindow` will register clicks in opaque regions AND pass clicks through in transparent regions UNLESS you set `ignoresMouseEvents` at which point all clicks register, regardless of colour, or all clicks pass through. \n\nAt some point in electron 7, `new BrowserWindow` started calling calling the harmless seeming `setIgnoreMouseEvents: NO` method, which forever disables transparent click through for the new window. \n\nThis add-on fixes the problem by patching `setIgnoreMouseEvents` to be a no-op for ALL `NSWindow`s. It also adds a function `MakeWindowIgnoreMouseEvents()` which calls the unpatched `setIgnoreMouseEvents: YES`.\n\n# Usage\n\nCall `InstallClickThroughPatch()` before the `new BrowserWindow` you want to have the default transparent clickthrough behaviour. Call `MakeWindowIgnoreMouseEvents(win.getNativeWindowHandle())` on any `BrowserWindow` on which you want to all clicks to pass through.\n\n# Future improvements\n\nHopefully chromium (I guess it's chromium) will stop doing `setIgnoreMouseEvents: NO` on its windows and this add-on will become obsolete.\nFailing that, I don't like the indiscriminate way the code disables `setIgnoreMouseEvents` for all windows, nor the fact that `setIgnoreMouseEvents: NO` becomes completely unreachable.\n\nIdeally the API would be just this:\n\n`DisableSetIgnoreMouseEventsForTheNextWindowToBeCreated()` (this \"flag-style\" API is necessary because by the time we get the `BrowserWindow` it's too late to apply the patch, the damage has been done). With this implementation you would be free to call `BrowswerWindow.setIgnoreMouseEvents` on other windows for no or full click through.\n\nThis cleaner approach would require dynamically subclassing the incoming `NSWindow`, making `setIgnoreMouseEvents` a no-op, but I haven't had time to implement and test this.\n\nMore info in this SO answer, and take note of the comment in which the surprising tri-state `ignoresMouseEvents` boolean is explained.\nhttps://stackoverflow.com/a/29451199/22147\n","readmeFilename":"README.md"}