Quartz events service could be used if we want to block system events dispatching, but there are 2 problems with it:
- Accessibility should be enabled by user;
- Quartz event service is forbidden under sandbox.
It's impossible to make the method 1 succeeded.
Inspired by @CodaFi, I decided to use subclass of NSWindow to implement it. A sample project is created at gitbub https://github.com/wentingliu/ScreenPicker, go and check it out.