|
|
@ -1,4 +1,6 @@
|
|
|
|
// Just random stdlib (and POSIX) so I don't have to think about these
|
|
|
|
// Just random stdlib (and POSIX) so I don't have to think about these
|
|
|
|
|
|
|
|
#include "config.h"
|
|
|
|
|
|
|
|
|
|
|
|
#include <unistd.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <stdlib.h>
|
|
|
@ -9,6 +11,10 @@
|
|
|
|
#include <errno.h>
|
|
|
|
#include <errno.h>
|
|
|
|
#include <sys/mman.h>
|
|
|
|
#include <sys/mman.h>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef CONFIG_WAIT_PERIOD
|
|
|
|
|
|
|
|
#include <time.h>
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
// Wayland includes
|
|
|
|
// Wayland includes
|
|
|
|
#include "wayland-client.h"
|
|
|
|
#include "wayland-client.h"
|
|
|
|
#include "session-lock.h"
|
|
|
|
#include "session-lock.h"
|
|
|
@ -97,6 +103,10 @@ int main(void) {
|
|
|
|
// nothing to do, just destroy stuff
|
|
|
|
// nothing to do, just destroy stuff
|
|
|
|
ext_session_lock_v1_destroy(lock);
|
|
|
|
ext_session_lock_v1_destroy(lock);
|
|
|
|
} else if (lock_state == LOCKED) {
|
|
|
|
} else if (lock_state == LOCKED) {
|
|
|
|
|
|
|
|
#ifdef CONFIG_WAIT_PERIOD
|
|
|
|
|
|
|
|
printf("Waiting %d s before unlocking…\n", CONFIG_WAIT_PERIOD);
|
|
|
|
|
|
|
|
sleep(CONFIG_WAIT_PERIOD);
|
|
|
|
|
|
|
|
#endif
|
|
|
|
printf("Unlocking…\n");
|
|
|
|
printf("Unlocking…\n");
|
|
|
|
ext_session_lock_v1_unlock_and_destroy(lock);
|
|
|
|
ext_session_lock_v1_unlock_and_destroy(lock);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|