feat: add lock session protocol support (WIP)
This commit is contained in:
13
output.c
13
output.c
@ -7,6 +7,8 @@
|
||||
#include "layer.h"
|
||||
#include "node.h"
|
||||
#include "view.h"
|
||||
#include "session.h"
|
||||
|
||||
static void output_frame(struct wl_listener *listener, void *data)
|
||||
{
|
||||
/* This function is called every time an output is ready to display a frame,
|
||||
@ -38,7 +40,10 @@ static void output_request_state(struct wl_listener *listener, void *data)
|
||||
static void output_destroy(struct wl_listener *listener, void *data)
|
||||
{
|
||||
struct diyac_output *output = wl_container_of(listener, output, destroy);
|
||||
|
||||
if(output->lock_handle)
|
||||
{
|
||||
diyac_session_unlock_output(output);
|
||||
}
|
||||
wlr_scene_node_destroy(&output->scenes.background->node);
|
||||
wlr_scene_node_destroy(&output->scenes.bottom->node);
|
||||
wlr_scene_node_destroy(&output->scenes.top->node);
|
||||
@ -147,6 +152,12 @@ void diyac_server_new_output(struct wl_listener *listener, void *data)
|
||||
output->layer_tree[ZWLR_LAYER_SHELL_V1_LAYER_BOTTOM] = output->scenes.bottom;
|
||||
output->layer_tree[ZWLR_LAYER_SHELL_V1_LAYER_TOP] = output->scenes.top;
|
||||
output->layer_tree[ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY] = output->scenes.overlay;
|
||||
|
||||
output->lock_handle = NULL;
|
||||
if(server->lock)
|
||||
{
|
||||
diyac_session_lock_output(output);
|
||||
}
|
||||
/*
|
||||
* Set the z-positions to achieve the following order (from top to
|
||||
* bottom):
|
||||
|
Reference in New Issue
Block a user