diff options
| author | Anders Nylander <nylander.anders@yandex.com> | 2019-03-12 11:16:33 +0100 |
|---|---|---|
| committer | emersion <contact@emersion.fr> | 2019-03-20 23:07:31 +0200 |
| commit | 7d5a73b0a99ca9b4c73a34faceda8bef2576fe23 (patch) | |
| tree | d65ebcb51592e82a849d89d63d64bd24db7c61e7 /include | |
| parent | 6b3be42264b9eaa8524ea4f0d93fbd1d82495d90 (diff) | |
Decouple the drawing of the background from drawing the indicator.
* Render background only once in main wl_surface
* Render indicator on subsurface
Diffstat (limited to 'include')
| -rw-r--r-- | include/swaylock.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/swaylock.h b/include/swaylock.h index 0324936..23e3408 100644 --- a/include/swaylock.h +++ b/include/swaylock.h @@ -69,6 +69,7 @@ struct swaylock_state { struct loop_timer *clear_password_timer; // clears the password buffer struct wl_display *display; struct wl_compositor *compositor; + struct wl_subcompositor *subcompositor; struct zwlr_layer_shell_v1 *layer_shell; struct zwlr_input_inhibit_manager_v1 *input_inhibit_manager; struct wl_shm *shm; @@ -90,8 +91,11 @@ struct swaylock_surface { uint32_t output_global_name; struct zxdg_output_v1 *xdg_output; struct wl_surface *surface; + struct wl_surface *child; // surface made into subsurface + struct wl_subsurface *subsurface; struct zwlr_layer_surface_v1 *layer_surface; struct pool_buffer buffers[2]; + struct pool_buffer indicator_buffers[2]; struct pool_buffer *current_buffer; bool frame_pending, dirty; uint32_t width, height; @@ -111,6 +115,7 @@ struct swaylock_image { void swaylock_handle_key(struct swaylock_state *state, xkb_keysym_t keysym, uint32_t codepoint); +void render_frame_background(struct swaylock_surface *surface); void render_frame(struct swaylock_surface *surface); void render_frames(struct swaylock_state *state); void damage_surface(struct swaylock_surface *surface); |
