golang-design / hotkey

⌨️ cross-platform hotkey package
https://golang.design/x/hotkey
MIT License
215 stars 10 forks source link

XLib event loop canceling #16

Open data-niklas opened 2 years ago

data-niklas commented 2 years ago

This PR allows canceling the XLib event loop by sending a custom ClientMessage on an invisible Window. See #15 For further XLib documentation refer to Tronche's documentation.

data-niklas commented 2 years ago

Thanks for testing the code! (It worked on my machine in my limited tests, haha). I will try to reproduce the error and stabilize the PR.

data-niklas commented 2 years ago

I think that 'unregister' might be called before the ´Display´ and ´Window´ are initialized in the handle method.

data-niklas commented 2 years ago

I added your test.