mirror of
https://github.com/labwc/labwc.git
synced 2025-11-02 09:01:47 -05:00
- Replaced `session_lock` with `session_lock_manager` which is persistent throughout the session. - Replaced `session_lock->abandoned` with `session_lock_manager->locked`. Old `session_lock->abandoned` is equal to `!session_lock_manager->lock && session_lock_manager->locked`. - Eliminated the use of global variables in `session-lock.c`. - Changed some function names.
36 lines
985 B
C
36 lines
985 B
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
#ifndef LABWC_SESSION_LOCK_H
|
|
#define LABWC_SESSION_LOCK_H
|
|
|
|
#include <wlr/types/wlr_session_lock_v1.h>
|
|
|
|
struct output;
|
|
struct server;
|
|
|
|
struct session_lock_manager {
|
|
struct server *server;
|
|
struct wlr_session_lock_manager_v1 *wlr_manager;
|
|
struct wlr_surface *focused;
|
|
/*
|
|
* When not locked: lock=NULL, locked=false
|
|
* When locked: lock=non-NULL, locked=true
|
|
* When lock is destroyed without being unlocked: lock=NULL, locked=true
|
|
*/
|
|
struct wlr_session_lock_v1 *lock;
|
|
bool locked;
|
|
|
|
struct wl_list session_lock_outputs;
|
|
|
|
struct wl_listener new_lock;
|
|
struct wl_listener destroy;
|
|
|
|
struct wl_listener lock_new_surface;
|
|
struct wl_listener lock_unlock;
|
|
struct wl_listener lock_destroy;
|
|
};
|
|
|
|
void session_lock_init(struct server *server);
|
|
void session_lock_output_create(struct session_lock_manager *manager, struct output *output);
|
|
void session_lock_update_for_layout_change(struct server *server);
|
|
|
|
#endif /* LABWC_SESSION_LOCK_H */
|