QBlocker icon indicating copy to clipboard operation
QBlocker copied to clipboard

QBlocker isn't delaying quitting

Open Brunty opened this issue 8 years ago • 4 comments

iMac (27-inch, Late 2013) OS X 10.10.5 (slightly older, I know)

For some reason, it seems QBlocker isn't blocking quitting (it's still running, I've had no errors), I've had it before on My Macbook (will get info on that later when I'm home) and have a suspicion it could be related to sleep / wake up (as I do that with my Macbook quite a lot)

If I quit Qblocker and run it again, it works fine.

Brunty avatar Feb 23 '17 15:02 Brunty

If it's only happening after sleep/wake it's likely the KeyListener not working correctly.

This is the method that activates the listeners

https://github.com/steve228uk/QBlocker/blob/master/QBlocker/KeyListener.swift#L173

We're currently activating it in the didFinishLaunching delegate method but we may need to move this.

https://github.com/steve228uk/QBlocker/blob/ebaa8a9c2ed5242fbcd63514193fe66851468a1c/QBlocker/AppDelegate.swift#L46

We could try putting this in applicationDidBecomeActive but I'm not 100% sure this is called when the Mac awakes.

steve228uk avatar Feb 24 '17 12:02 steve228uk

@steve228uk Any updates on this? Also, I believe the right way to do it is to use NSWorkspace.shared().notificationCenter and add observer for NSWorkspaceDidWake notification.

stek29 avatar May 16 '17 23:05 stek29

This appears to have gotten worse in Mojave. Just about every time the computer locks, it gives up control.

harleyjcooper avatar Nov 08 '18 18:11 harleyjcooper

Probably, I have the same problem! The application works ambiguously. I don't touch the settings, but sometimes it prevents Cmd+Q, and sometimes it doesn't. Even in a single wake/lock session. It is really annoying. My OS is 10.15.1 Catalina, and QBlocker version is the last one 1.2.

AivanF avatar Jan 13 '20 22:01 AivanF