scene_graph: Port ext_session_v1

This commit is contained in:
Alexander Orzechowski 2024-01-18 10:04:26 -05:00 committed by Kirill Primak
parent 0639bde9fb
commit 9a57966606
12 changed files with 280 additions and 192 deletions

View file

@ -24,6 +24,7 @@ struct sway_output {
struct {
struct wlr_scene_tree *tiling;
struct wlr_scene_tree *fullscreen;
struct wlr_scene_tree *session_lock;
} layers;
// when a container is fullscreen, in case the fullscreen surface is

View file

@ -28,6 +28,19 @@
struct sway_transaction;
struct sway_session_lock {
struct wlr_session_lock_v1 *lock;
struct wlr_surface *focused;
bool abandoned;
struct wl_list outputs; // struct sway_session_lock_output
// invalid if the session is abandoned
struct wl_listener new_surface;
struct wl_listener unlock;
struct wl_listener destroy;
};
struct sway_server {
struct wl_display *wl_display;
struct wl_event_loop *wl_event_loop;
@ -92,15 +105,9 @@ struct sway_server {
struct wl_listener gamma_control_set_gamma;
struct {
bool locked;
struct sway_session_lock *lock;
struct wlr_session_lock_manager_v1 *manager;
struct wlr_session_lock_v1 *lock;
struct wlr_surface *focused;
struct wl_listener lock_new_surface;
struct wl_listener lock_unlock;
struct wl_listener lock_destroy;
struct wl_listener new_lock;
struct wl_listener manager_destroy;
} session_lock;
@ -174,6 +181,10 @@ void handle_new_output(struct wl_listener *listener, void *data);
void handle_idle_inhibitor_v1(struct wl_listener *listener, void *data);
void handle_layer_shell_surface(struct wl_listener *listener, void *data);
void sway_session_lock_init(void);
void sway_session_lock_add_output(struct sway_session_lock *lock,
struct sway_output *output);
bool sway_session_lock_has_surface(struct sway_session_lock *lock,
struct wlr_surface *surface);
void handle_xdg_shell_toplevel(struct wl_listener *listener, void *data);
#if HAVE_XWAYLAND
void handle_xwayland_surface(struct wl_listener *listener, void *data);

View file

@ -41,6 +41,7 @@ struct sway_root {
struct wlr_scene_tree *fullscreen;
struct wlr_scene_tree *fullscreen_global;
struct wlr_scene_tree *seat;
struct wlr_scene_tree *session_lock;
} layers;
#if HAVE_XWAYLAND