chiark
/
gitweb
/
~mdw
/
disorder
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make the Disobedience login window a bit saner. There is now just a
[disorder]
/
disobedience
/
log.c
diff --git
a/disobedience/log.c
b/disobedience/log.c
index 83aa5826b92323021848a64de7390bc88b11ff2a..b0aaace133ef1795dff00ed9ab1df1df64a9f324 100644
(file)
--- a/
disobedience/log.c
+++ b/
disobedience/log.c
@@
-83,10
+83,12
@@
static struct monitor *monitors;
/** @brief Update everything */
void all_update(void) {
/** @brief Update everything */
void all_update(void) {
+ ++suppress_actions;
queue_update();
recent_update();
volume_update();
added_update();
queue_update();
recent_update();
volume_update();
added_update();
+ --suppress_actions;
}
/** @brief Called when the client connects
}
/** @brief Called when the client connects
@@
-167,7
+169,8
@@
static void log_state(void attribute((unused)) *v,
const struct monitor *m;
unsigned long changes = state ^ last_state;
static int first = 1;
const struct monitor *m;
unsigned long changes = state ^ last_state;
static int first = 1;
-
+
+ ++suppress_actions;
if(first) {
changes = -1UL;
first = 0;
if(first) {
changes = -1UL;
first = 0;
@@
-182,15
+185,18
@@
static void log_state(void attribute((unused)) *v,
if(changes & m->mask)
m->callback(m->u);
}
if(changes & m->mask)
m->callback(m->u);
}
+ --suppress_actions;
}
/** @brief Called when volume changes */
static void log_volume(void attribute((unused)) *v,
int l, int r) {
}
/** @brief Called when volume changes */
static void log_volume(void attribute((unused)) *v,
int l, int r) {
- if(
volume_l != l || volume_r != r
) {
+ if(
!rtp_supported && (volume_l != l || volume_r != r)
) {
volume_l = l;
volume_r = r;
volume_l = l;
volume_r = r;
+ ++suppress_actions;
volume_update();
volume_update();
+ --suppress_actions;
}
}
}
}