summaryrefslogtreecommitdiff
path: root/include/swaylock.h
AgeCommit message (Collapse)Author
2023-03-22Stop pooling background surface buffersManuel Stoeckl
The wl_buffers for the background surface only need to be updated when the output dimensions change. Using the fixed pool of two buffers to cache these buffers does not help, since if a new buffer is needed, it will have a different size than whatever buffers were cached. Furthermore, because the pool has fixed size, it is possible to run out of buffers if configure events arrive faster than pool buffers are marked not busy, which can lead to protocol errors when the background surface is committed after acknowledging a new size, but without attaching a buffer that matches that size.
2023-01-28Drop support for layer-shellSimon Ser
Superseded by ext-session-lock-v1
2023-01-28Add --ready-fdSimon Ser
This implements a readiness notification mechanism which works on both systemd and s6. References: https://github.com/swaywm/swaylock/pull/42 References: https://github.com/swaywm/swaylock/pull/275
2023-01-28Wait for the locked eventSimon Ser
We were ignoring the locked event. Wait for it instead.
2023-01-27Remove unused fields in swaylock_surfaceManuel Stoeckl
2023-01-27Estimate buffer size in advance for render_frameManuel Stoeckl
The size of the surface used to draw the indicator depends on the extents of the text being drawn on and under the indicator. This commit refactors the `render_frame` function so that the surface size is computed before drawing; before, `render_frame` drew onto a buffer, estimated the size the buffer should have had, and recursively called itself to try again with the estimated size, if necessary. This was done because Cairo's methods to estimate font and text size require that a cairo_t context object and an associated cairo_surface already have been set up. Since the surface size depends on the text size, the natural way to use Cairo would have a circular dependency. In order to compute sizes _before_ the buffer is created, this commit adds a 1x1 surface and a matching `test_cairo` context which is set to the same font and drawing parameters as the buffer that will be created. Font/text extent measurements should give the same results as for the final buffer.
2022-11-14renderer: work with current buffer locallyAlexander Orzechowski
No need to store this globally accessible struct member.
2022-06-15Use mlock for password bufferRobin Ebert
2022-03-20Remove redundant function render_frames()Johan Malm
2022-03-10Drop xdg-output requirementSimon Ser
Rely on wl_output v4 instead.
2022-02-02Add support for ext-session-lock-v1Simon Ser
This is a new protocol to lock the session [1]. It should be more reliable than layer-shell + input-inhibitor. [1]: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/131
2019-11-27Added option to adjust ring position via CLI arguments and the config fileMatt Della
2019-08-04Adds option to show indicator even if idleAlexander Martin
2019-06-22Resizable buffer size for the subsurfaceAbdelhakim Qbaich
2019-05-05Add fixed font-size option for indicatorPeter Kasza
This commit adds a new command line option called --font-size to specify a fixed font size in the indicator. The default value for font-size is 0, which means that the text will autoscale. Any other positive value will result in a fixed text size.
2019-04-22Added hide keyboard layout optionbbgun7
2019-03-20Decouple the drawing of the background from drawing the indicator.Anders Nylander
* Render background only once in main wl_surface * Render indicator on subsurface
2019-02-06Display xkb layout while typingDominik Bendle
Displays the current keyboard layout below the unlock indicator if more than one xkb layout is configured or the show-keyboard-layout option is given. The text is displayed with a background box. Adds commandline options for text color, background color and border color of the box as well.
2019-01-29Add option show-failed-attemptsDominik Bendle
Keeps track of unsuccessful authentication attempts via an int counter in the state struct. Displays on the unlock indicator, but will be replaced by the Caps Lock text if enabled.
2019-01-18Make setuid error clearer.Connor E
2019-01-17Check password without blockingemersion
2019-01-17Move PAM into a child processemersion
2019-01-14Add caps lock state to indicatorRobinhuett
This implements customization for the indicator as proposed in sway#2788 with comments from sway#3367 in mind. The default behaviour does not change exept for the caps lock text color. Since these changes seem to be lost in the split I've remade them.
2019-01-13Convert swaylock into standalone projectDrew DeVault