ApolloZhu / Dynamic-Dark-Mode

The smart, automatic Dark Mode toggle for macOS Mojave+

Home Page:https://apollozhu.github.io/Dynamic-Dark-Mode/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Allow controlling system events won't start DDM

etrahretep opened this issue · comments

Schermafbeelding 2019-09-14 om 17 54 16

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

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

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)

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):

  • What do you mean by "with controlled hold"?
  • By "won't hold after restart" you mean DDM don't have the System Events permission check after restarting macOS?

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.

  • If you have to reopen DDM after giving it permission and everything works, there is a chance that macOS permission system has a caching bug.

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....

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

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.

Apollo,

Still problems when togging darkmode...

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

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 .

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

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.

Right, done!

Please update to 1.5.2