feat: add lock session protocol support (WIP)
This commit is contained in:
31
diyac.h
31
diyac.h
@ -16,6 +16,7 @@
|
||||
#include <wlr/types/wlr_primary_selection.h>
|
||||
#include <wlr/types/wlr_fractional_scale_v1.h>
|
||||
#include <wlr/types/wlr_foreign_toplevel_management_v1.h>
|
||||
#include <wlr/types/wlr_session_lock_v1.h>
|
||||
|
||||
#define LAYER_TREE_SZ 4
|
||||
|
||||
@ -100,6 +101,18 @@ struct diyac_node_descriptor
|
||||
struct wl_listener destroy;
|
||||
};
|
||||
|
||||
struct diyac_session_lock
|
||||
{
|
||||
bool abandoned;
|
||||
struct wlr_surface * focused;
|
||||
|
||||
struct wlr_session_lock_v1* wlr_session_lock;
|
||||
struct wl_listener new_surface;
|
||||
struct wl_listener unlock;
|
||||
struct wl_listener destroy;
|
||||
//struct wl_listener new_output;
|
||||
};
|
||||
|
||||
struct diyac_server
|
||||
{
|
||||
struct wl_display *wl_display;
|
||||
@ -117,7 +130,6 @@ struct diyac_server
|
||||
struct wl_list views;
|
||||
struct diyac_view * active_view;
|
||||
struct wlr_foreign_toplevel_manager_v1 *foreign_toplevel_manager;
|
||||
|
||||
/*
|
||||
* Popups need to be rendered above always-on-top views, so we reparent
|
||||
* them to this dedicated tree
|
||||
@ -135,6 +147,8 @@ struct diyac_server
|
||||
struct wlr_output_layout *output_layout;
|
||||
struct wl_list outputs;
|
||||
struct wl_listener new_output;
|
||||
|
||||
struct diyac_session_lock * lock;
|
||||
};
|
||||
|
||||
struct diyac_layer_surface
|
||||
@ -150,6 +164,19 @@ struct diyac_layer_surface
|
||||
struct wl_listener new_popup;
|
||||
};
|
||||
|
||||
struct diyac_output_lock_handle
|
||||
{
|
||||
struct wlr_scene_tree *tree;
|
||||
struct wlr_scene_rect *background;
|
||||
|
||||
struct wlr_session_lock_surface_v1 *surface;
|
||||
struct diyac_output * output;
|
||||
struct wl_listener surface_destroy;
|
||||
struct wl_listener surface_map;
|
||||
|
||||
struct wl_listener commit;
|
||||
};
|
||||
|
||||
struct diyac_output
|
||||
{
|
||||
struct wl_list link;
|
||||
@ -164,6 +191,8 @@ struct diyac_output
|
||||
struct diyac_output_scenes scenes;
|
||||
// alias to diyac_output_scenes elements
|
||||
struct wlr_scene_tree *layer_tree[LAYER_TREE_SZ];
|
||||
// lock handle
|
||||
struct diyac_output_lock_handle * lock_handle;
|
||||
};
|
||||
|
||||
struct foreign_toplevel
|
||||
|
Reference in New Issue
Block a user