switch to meson build + refactor code to remove compile warning
This commit is contained in:
@@ -39,6 +39,7 @@ static void session_lock_update_geometry(struct diyac_output *output, bool align
|
||||
|
||||
static void handle_surface_map(struct wl_listener *listener, void *data)
|
||||
{
|
||||
(void) data;
|
||||
struct diyac_output_lock_handle *handle = wl_container_of(listener, handle, surface_map);
|
||||
if (!g_server->lock->focused)
|
||||
{
|
||||
@@ -49,6 +50,7 @@ static void handle_surface_map(struct wl_listener *listener, void *data)
|
||||
|
||||
static void handle_surface_destroy(struct wl_listener *listener, void *data)
|
||||
{
|
||||
(void) data;
|
||||
struct diyac_output_lock_handle *handle = wl_container_of(listener, handle, surface_destroy);
|
||||
|
||||
if (g_server->lock->focused == handle->surface->surface)
|
||||
@@ -123,6 +125,7 @@ static void session_lock_destroy(struct diyac_session_lock *lock)
|
||||
|
||||
static void handle_unlock(struct wl_listener *listener, void *data)
|
||||
{
|
||||
(void) data;
|
||||
struct diyac_session_lock *lock = wl_container_of(listener, lock, unlock);
|
||||
wlr_log(WLR_INFO, "handle_unlock: Lock session is unlocked");
|
||||
session_lock_destroy(lock);
|
||||
@@ -131,6 +134,7 @@ static void handle_unlock(struct wl_listener *listener, void *data)
|
||||
|
||||
static void handle_session_lock_destroy(struct wl_listener *listener, void *data)
|
||||
{
|
||||
(void) data;
|
||||
struct diyac_session_lock *lock = wl_container_of(listener, lock, destroy);
|
||||
lock->abandoned = true;
|
||||
wlr_log(WLR_INFO, "handle_session_lock_destroy: Lock session is destroyed without unlocking, session abandoned");
|
||||
@@ -141,6 +145,7 @@ static void handle_session_lock_destroy(struct wl_listener *listener, void *data
|
||||
|
||||
static void handle_new_session_lock(struct wl_listener *listener, void *data)
|
||||
{
|
||||
(void) listener;
|
||||
struct wlr_session_lock_v1 *lock = data;
|
||||
if (g_server->lock)
|
||||
{
|
||||
@@ -200,6 +205,8 @@ static void handle_commit(struct wl_listener *listener, void *data)
|
||||
|
||||
static void handle_lock_manager_destroy(struct wl_listener *listener, void *data)
|
||||
{
|
||||
(void) data;
|
||||
(void) listener;
|
||||
if (g_server->lock)
|
||||
{
|
||||
session_lock_destroy(g_server->lock);
|
||||
@@ -245,9 +252,9 @@ void diyac_session_lock_output(struct diyac_output *output)
|
||||
handle->background = wlr_scene_rect_create(handle->tree, 0, 0, black);
|
||||
if (!handle->background)
|
||||
{
|
||||
wlr_scene_node_destroy(&handle->tree->node);
|
||||
free(handle);
|
||||
wlr_log(WLR_ERROR, "diyac_session_lock_output:Unable to create lock background");
|
||||
wlr_scene_node_destroy(&handle->tree->node);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
handle->surface = NULL;
|
||||
|
Reference in New Issue
Block a user