Skip to content
This repository has been archived by the owner on Jul 5, 2023. It is now read-only.

Handle dbus events instead of signals #11

Merged
merged 2 commits into from
Feb 28, 2023
Merged

Conversation

aerz
Copy link
Contributor

@aerz aerz commented Feb 28, 2023

Emacs gets several signals related with different events of dbus which makes it appear that it receives the same signals multiple times as commented in Because we don't need to be listening all kinds of signals, we could just listen for events over a dbus name by using dbus-register-monitor.

Along with this, the commit includes:

  • Replace darkman--mode-changed-signal-handler with darkman--call-event-handler to be a real handler of all method_call events from darkman dbus.
  • Create darkman-load-theme-mode function that will be called every time Mode property in nl.whynothugo.darkman interface is called.
  • Add Package-Requires Emacs 28.1 to fix warnings from package-lint
  • Set related issue tasks as DONE
  • Fix Themes will sometimes switch infinitely #10 as commented @grtcdr in #issuecomment-1447145236

Emacs gets several signals related with different events of dbus which
makes it appear that it receives the same signals multiple times as commented in
Because we don't need to be listening all kinds of signals, we could
just listen for events over a dbus name by using `dbus-register-monitor`.

Along with this, the commit includes:
* Replace `darkman--mode-changed-signal-handler` with
`darkman--call-event-handler` to be a real handler of all method_call events
from darkman dbus.
* Create `darkman-load-theme-mode` function that will be called every
time `Mode` property in `nl.whynothugo.darkman` interface is called.
* Add Package-Requires Emacs 28.1 to fix warnings from package-lint
* Set related issue tasks as DONE
* Fix grtcdr#10 as commented @grtcdr in #issuecomment-1447145236
@aerz
Copy link
Contributor Author

aerz commented Feb 28, 2023

Feel free to suggest or ask anything to improve the PR @grtcdr 👍

darkman.el Outdated Show resolved Hide resolved
Too early and few cases to do so.
Copy link
Owner

@grtcdr grtcdr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

I really appreciate the help :)

@grtcdr grtcdr merged commit 6e6865b into grtcdr:main Feb 28, 2023
@aerz aerz deleted the dbus-handle branch March 18, 2023 11:36
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Themes will sometimes switch infinitely
2 participants