ApolloZhu / Dynamic-Dark-Mode

The smart, automatic Dark Mode toggle for macOS Mojave+
https://apollozhu.github.io/Dynamic-Dark-Mode/
GNU General Public License v3.0
504 stars 31 forks source link

Allow controlling system events won't start DDM #75

Closed etrahretep closed 5 years ago

etrahretep commented 5 years ago

Schermafbeelding 2019-09-14 om 17 54 16

Can't get any further with this! Catalina 10.15 bèta (19A558d)

ApolloZhu commented 5 years ago

Hmmm... even if you click on “Check Permission” / reopening the app? That would be very strange

etrahretep commented 5 years ago

No, every time I open the app it asks to check permissions. Which are checked. Starting the app with controlled hold opens the preferences but won't hold after restart. Tried different versions of DDM (1.2 to 1.5 won't precede, 1.1.5 does)

ApolloZhu commented 5 years ago

Interestingly, no code changes were made towards checking System Events permission between 1.1.5 and 1.2.0, so I don't see why 1.1.5 works but not 1.2.0 and above. I even changed my system language to Dutch, still all versions goes through the process.

I guess I'll add an option to bypass the check (although probably something won't work), but here are some questions I wish you could answer (which might help me understanding why this is happening):

Also, this is what I found online:

"quit and reopened Xcode (the TCC privileges seem to be cached"

That is, the permission system since Mojave might cache the current state before changes are applied. DDM used to require reopening DDM after changing permission, although later that became unnecessary with a Mojave update.

etrahretep commented 5 years ago

After restart the setup screen appears and when clicking that the check permissions message pops up again. Double clicking the app again (with the permissions screen open) opens preferences behind that screen. I can change settings but after restart the setup screen reappears....

ApolloZhu commented 5 years ago

That does sound like another bug. I'll add an option to skip the setup process and see how that works out.

ApolloZhu commented 5 years ago

1.5.1 allows you to skip setup and execute AppleScript even when DDM think you didn't give it the permission to do so. Give it a try and see if can run the AppleScript without any issue. If AppleScript fails like it has been, I might consider using another approach.

etrahretep commented 5 years ago

Apollo,

Still problems when togging darkmode...

Schermafbeelding 2019-09-19 om 08 37 33 Schermafbeelding 2019-09-19 om 08 37 54

ApolloZhu commented 5 years ago

Than that’s a bug on Apple’s side and you may want to report it to them somehow.

Meanwhile, I’ll switch to an alternative implementation to achieve the same goal in next release .

etrahretep commented 5 years ago

Using Catalina 10.15 bèta (19A558d). I'll wait out the GM and see what happens.

ApolloZhu commented 5 years ago

Better report it early so they know there is a bug to fix. And the more people report, earlier they get their hands on solving it.

etrahretep commented 5 years ago

Right, done!

ApolloZhu commented 5 years ago

Please update to 1.5.2