When blur is requested, open the window before blurring #278
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
When locking screen, first open the window with a color (specified with
--color
) as background, then, if blurring is requested, do that and redraw window.My use case is to lock screen when the laptop lid is closed (I use
xss-lock
for that) but sometimesi3lock-color
doesn't manage to do the blurring in time, as a consequence, when the lid is opened, one has about a second or two to see the screen before the screen is locked. The solution is to first open the window earlier, and update it after processing the blur.Relates to #239. Not sure if the PR resolves it, but it can certainly act as an intermediate solution before a fancier locking mechanism, as requested by the issue author, is implemented. By the way, I think, the requested behavior is achieved with running
i3lock -B <sigma> --color '#00000000'
: it will first open the window with fully transparent background, then blur the screenshot and update the window whenever it has finished the processing.Release notes
Notes: open the lock window earlier when locking with blurring
Behavior worth noticing
unless the enter key was pressed. But if it was, the lock screen at first seems to behave the same way (that is, all the decorations appear and it then shows the "verifying..." caption), but it remains stuck in the verifying state until I try to retype my password and verify again. Even with the--no-verify
option, pressing enter on the early window stage will bring it to the verifying state.I would appreciate a hint on why this could be happening. If you know how to fix this, feel free to submit a patch, otherwise I will try to dig deeper into this later when I have time.
No 'unless' anymore, everything is fine now :)
i3lock-color
is supposed to support the--image
and--blur
options together and, if yes, what behavior is expected, but it would probably make sense to display the background image while the blurring is in progress, not a solid color. Should it?