aboutsummaryrefslogtreecommitdiffstats
path: root/src/state.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2016-07-18 16:23:24 +0200
committerMattias Andrée <maandree@kth.se>2016-07-18 16:23:24 +0200
commit095c60ce3ad3f3855c1a0a81549a2a9bcdaa6d12 (patch)
tree40cbfbb7ac662c648d0b0a66b23cd12d9cd87ea8 /src/state.c
parentImplement reconnect (diff)
downloadcoopgammad-095c60ce3ad3f3855c1a0a81549a2a9bcdaa6d12.tar.gz
coopgammad-095c60ce3ad3f3855c1a0a81549a2a9bcdaa6d12.tar.bz2
coopgammad-095c60ce3ad3f3855c1a0a81549a2a9bcdaa6d12.tar.xz
If disconnected when reexecuting, keep disconnected after reexecution
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r--src/state.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/state.c b/src/state.c
index d140789..c8cb1d9 100644
--- a/src/state.c
+++ b/src/state.c
@@ -137,7 +137,7 @@ libgamma_crtc_state_t* restrict crtcs = NULL; /* do not marshal */
/**
* Preserve gamma ramps at priority 0?
*/
-int preserve = 0; /* do not marshal, pass on via command line arguments */
+int preserve = 0;
@@ -263,6 +263,10 @@ size_t state_marshal(void* restrict buf)
off += n;
}
+ if (bs != NULL)
+ *(int*)(bs + off) = preserve;
+ off += sizeof(int);
+
return off;
}
@@ -354,6 +358,9 @@ size_t state_unmarshal(const void* restrict buf)
else
off += sizeof(int);
+ preserve = *(const int*)(bs + off);
+ off += sizeof(int);
+
return off;
}