Make boot greeter frameless and match Gaming display mode
This commit is contained in:
parent
7bc5a4c852
commit
0eaf97d134
4 changed files with 47 additions and 3 deletions
|
|
@ -21,7 +21,14 @@ s = (
|
|||
)
|
||||
s = (
|
||||
s.rstrip()[:-1]
|
||||
+ """ IpcHandler { target: "test"; function submit(password: string): void { auth.submitted(password); } }
|
||||
+ """ IpcHandler {
|
||||
target: "test"
|
||||
function submit(password: string): void { auth.submitted(password); }
|
||||
function closeCheck(): bool {
|
||||
root.close();
|
||||
return root.visible && (root.flags & Qt.FramelessWindowHint) !== 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
"""
|
||||
)
|
||||
|
|
@ -62,6 +69,19 @@ try:
|
|||
data = json.dumps(value).encode()
|
||||
conn.sendall(struct.pack("<I", len(data)) + data)
|
||||
|
||||
for _ in range(30):
|
||||
result = sp.run(
|
||||
[qs, "ipc", "--pid", str(proc.pid), "call", "test", "closeCheck"],
|
||||
env=env, capture_output=True, text=True,
|
||||
)
|
||||
if result.returncode == 0:
|
||||
assert result.stdout.strip() == "true", result.stdout
|
||||
break
|
||||
time.sleep(0.1)
|
||||
else:
|
||||
raise AssertionError(result.stderr)
|
||||
assert proc.poll() is None, "Closing the greeter must not exit it"
|
||||
|
||||
def submit():
|
||||
for _ in range(30):
|
||||
result = sp.run(
|
||||
|
|
@ -120,7 +140,7 @@ try:
|
|||
send({"type": "success"})
|
||||
time.sleep(0.3)
|
||||
print(
|
||||
"Greeter: failed password does not launch; retry and authenticated launch pass"
|
||||
"Greeter: frameless window rejects close; failed password does not launch; retry and authenticated launch pass"
|
||||
)
|
||||
finally:
|
||||
proc.terminate()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue