Prevent duplicate xlocker activation during X11 session startup
This commit is contained in:
1 parent
b8dea31b59
commit
dbd8cef2e1
8 files changed
+114
-96
No files matched your search
@@ -674,16 +674,20 @@ int locker_run_main(int argc, char** argv) {
|
||||
};
|
||||
|
||||
auto lockPhone = [&](bool blankDisplay) {
|
||||
bool alreadyVisible = visible;
|
||||
writeSmallFileStr(kLockFlagPath, "1\n");
|
||||
writeIntFile(activePidPath, static_cast<int>(::getpid()));
|
||||
closeOtherOverlays();
|
||||
verifier.refreshIfNeeded();
|
||||
passcode.clear();
|
||||
statusMsg.clear();
|
||||
statusIsError = false;
|
||||
lockActivatedMs = nowMs();
|
||||
lastActivityMs = lockActivatedMs;
|
||||
writeSoftkeySuppress(lockActivatedMs + 400);
|
||||
int64_t now = nowMs();
|
||||
lastActivityMs = now;
|
||||
if (!alreadyVisible || blankDisplay) {
|
||||
passcode.clear();
|
||||
statusMsg.clear();
|
||||
statusIsError = false;
|
||||
lockActivatedMs = now;
|
||||
writeSoftkeySuppress(now + 400);
|
||||
}
|
||||
if (!visible) {
|
||||
XMapRaised(dpy, win);
|
||||
XMoveResizeWindow(dpy, win, 0, 0, kScreenWidth, kScreenHeight);
|
||||
|
||||
Reference in new issue
Block a user