ErikReider / SwayNotificationCenter

A simple GTK based notification daemon for SwayWM
GNU General Public License v3.0
1.29k stars 62 forks source link

[Bug] Toggle button calls toggle action when updating state #405

Closed theRealCarneiro closed 6 months ago

theRealCarneiro commented 6 months ago

Please read through the README and the Man pages before submitting Please also make sure that there isn't any prior issue describing this bug

Describe the bug When the state of a toggle button is changed by the update command, the toggle action is called.

To Reproduce Let's just imagine a WiFi toggle button, steps to reproduce the behavior:

  1. Change the WiFi state using a command like 'rfkill' while the Control Center (CC) is closed.
  2. Open CC
  3. The CC attempts to synchronize the button state with the WiFi state.
  4. Consequently, the CC executes the toggle action on the button as if the user had clicked it

Expected behavior The expected behavior is for the toggle action to be blocked when updating the button state.

Please provide logs if you're experiencing notification errors / bugs Logs are not relevant in this scenario.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information): Doesn't matter

Additional context Based on my understanding of GTK, the toggle signal of the button should be blocked during state changes.