Comments (6)
I'm not sure this is a good thing to do. I'm worried about unlocking in other situations that when the user has correctly typed their password. If the compositor decides to unlock, they shouldn't care that the client sends the unlock_and_destroy
request.
from swaylock.
I suppose this issue is primarily about the exit code. To sort that part out, we could exit(0)
if we have previously received confirmation of lock, and exit(2)
otherwise, so scripts that called swaylock can see that it was not a failure.
(Sending destroy
before existing is redundant, the compositor will clean up.)
from swaylock.
An exit(0)
would solve my particular problem. However, I see why an exit(2)
was being used, because this finished
event is sent both when the compositor is done with the lock and when the compositor denies the lock altogether. I would expect an exit(0)
in the former and an exit(2)
in the latter, as the latter means the lockscreen didn't work at all.
from swaylock.
I'm a little uneasy exiting with a zero code when the user hasn't explicitly unlocked the screen by typing the correct password.
from swaylock.
Yeah I understand that. The fact that the finished
event is coupled with a theoretical denied
event isn't helping matters either. The spec says "This might also be sent because the compositor implements some alternative, secure way to authenticate and unlock the session" but how could we know from the finished
event whether or not that was sent in response to a failure.
If that's the case, I'd be okay leaving it for the time being. We might eventually require an updated spec if we're serious about the idea that compositor may implement another avenue for authentication (e.g. logind) 😉
from swaylock.
Although... Perhaps I am wrong! There are two scenarios I see:
- The
finished
event is received before thelocked
event, meaning that the lockscreen never started. - The
finished
event is received after thelocked
event, meaning that the compositor decided that the lockscreen is no longer needed
The first case would be a valid exit(2)
, while the second would be a valid exit(0)
from swaylock.
Related Issues (20)
- Swaylock using 940% of CPU HOT 2
- [bug] hyprland swaylock HOT 3
- view lockpad on wakeup ? HOT 4
- Mouse cursor visible in swaylock HOT 7
- [feature-request] Would it be possible to add the current time in the middle of circle or the current username HOT 4
- Swaylock prevents gnome calls from playing ringtone HOT 4
- Screencopy failed on hyprland dpms on HOT 1
- Caps Lock indicator colors not used HOT 3
- Swaylock blocked and cannot interact with HOT 6
- Missing ext-session-lock-v1 HOT 3
- the config file does not work after the update HOT 3
- [Feature Request] icon overlay on lock screen similar to `13lockr` HOT 1
- Add include directive HOT 1
- Swaylock does not process any given arguments HOT 7
- Image upside down (fixed on swaybg) HOT 1
- Moonlight still visible while locked HOT 1
- Error in Hyprland. swaylock: ../swaylock-1.7.2/main.c:414: join_args: Assertion `argc > 0' failed. HOT 2
- [FR] Support for unlock timeout for RSI/OOS HOT 3
- Unlock signal isn't sent to swayidle HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swaylock.