From 3d05358685038ad19980e8dd194dd65d338172fc Mon Sep 17 00:00:00 2001 From: Dustin Falgout Date: Tue, 19 Apr 2016 08:15:34 -0500 Subject: [PATCH] fix build errors --- src/lightdm-webkit2-greeter.c | 2 +- themes/antergos/js/greeter.js | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/lightdm-webkit2-greeter.c b/src/lightdm-webkit2-greeter.c index 8e4d924..48430ac 100644 --- a/src/lightdm-webkit2-greeter.c +++ b/src/lightdm-webkit2-greeter.c @@ -216,7 +216,7 @@ message_received_cb(WebKitUserContentManager *manager, message_str = ""; printf("Error running javascript: unexpected return value"); } -quit + if (strcmp(message_str, "LockHint") == 0) { lock_hint_enabled_handler(); } else if (strcmp(message_str, "Heartbeat") == 0) { diff --git a/themes/antergos/js/greeter.js b/themes/antergos/js/greeter.js index 4009ca4..b7bb9b6 100644 --- a/themes/antergos/js/greeter.js +++ b/themes/antergos/js/greeter.js @@ -82,9 +82,15 @@ class AntergosThemeUtils { initialize_theme_heartbeat() { + var heartbeats = 0; + this.log('Initializing theme heartbeat.'); this.heartbeat = setInterval(() => { + ++heartbeats; window.webkit.messageHandlers.GreeterBridge.postMessage('Heartbeat'); + if (heartbeats < 20) { + console.log('Sending heartbeat...'); + } }, 5000); }