diff options
Diffstat (limited to 'src/servers/crtc.c')
-rw-r--r-- | src/servers/crtc.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/servers/crtc.c b/src/servers/crtc.c index 5b3af43..41056bf 100644 --- a/src/servers/crtc.c +++ b/src/servers/crtc.c @@ -16,6 +16,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include "crtc.h" +#include "gamma.h" #include "../state.h" #include "../communication.h" @@ -195,3 +196,35 @@ int merge_state(struct output* restrict old_outputs, size_t old_outputs_n) return 0; } + + +/** + * Disconnect from the site + * + * @return Zero on success, -1 on error + */ +int disconnect(void) +{ + if (!connected) + return 0; + + connected = 0; + return 0; /* TODO disconnect() */ +} + + +/** + * Reconnect to the site + * + * @return Zero on success, -1 on error + */ +int reconnect(void) +{ + if (connected) + return 0; + + connected = 1; + reapply_gamma(); + return 0; /* TODO reconnect() */ +} + |