psieg / Lightpack

Lightpack and Prismatik open repository
GNU General Public License v3.0
1.59k stars 190 forks source link

Disable screen grabbing when computer goes to sleep #327

Open Adirael opened 4 years ago

Adirael commented 4 years ago

I think this is specific for macOS.

When the computer goes to sleep it may be unlocked again by having an Apple Watch linked to iCloud and nearby the computer. This functionality is disabled if the screen grabber is running.

It would be a QOL improvement to detect this event and disable the grabber when sleeping, and then enabling it again once the computer wakes up.

I'll try to do a PR with this myself soon.

zomfg commented 4 years ago

does this happen when you run this? (so without Prismatik running)

and do you mean that the mac doesn't go to sleep with the grabber? or Prismatik continues to run after sleep?

normally we track these and stop if you check the relevant box in the settings https://github.com/psieg/Lightpack/blob/c9992ad117b9a955fb7e16cfc1b0b5db039a780e/Software/src/MacOSSession.mm#L74-L82 and it does not look like there are new ones

but a while back someone reported something like that and I wasn't able to reproduce

Adirael commented 4 years ago

Ha, you're right. It's not really related to sleep, but with screen lock.

When the computer goes to sleep the grabber stops (lights go off) but then, once it wakes up, the lights light up again before logging the user in, thus disabling the "unlock with apple watch" functionality.

Same thing happens with the AVScreenShack package.

psieg commented 4 years ago

Do I understand correctly that a the fact that a grabber is active prevents the unlock with watch?

psieg commented 4 years ago

@Adirael any update?

ShonP40 commented 6 months ago

@psieg yea, having a screen capture program running while on the lock screen prevents Apple Watch unlock from working

Would be nice if you added a feature that disables Prismatik while on the lock screen to allow for watch unlocking