mirror of
https://github.com/swaywm/sway.git
synced 2025-11-01 22:58:41 -04:00
Add swaylock protocol, add resource destructors
This prevents sway crashing if swaybg or swaybar dies.
This commit is contained in:
parent
2b38f298ff
commit
71afa38890
7 changed files with 68 additions and 1 deletions
|
|
@ -1,18 +1,21 @@
|
|||
#ifndef _SWAY_EXTENSIONS_H
|
||||
#define _SWAY_EXTENSIONS_H
|
||||
|
||||
#include <wayland-server-core.h>
|
||||
#include <wlc/wlc-wayland.h>
|
||||
#include "wayland-desktop-shell-server-protocol.h"
|
||||
#include "list.h"
|
||||
#include "wlc/wlc-wayland.h"
|
||||
|
||||
struct background_config {
|
||||
wlc_handle output;
|
||||
wlc_resource surface;
|
||||
struct wl_resource *resource;
|
||||
};
|
||||
|
||||
struct panel_config {
|
||||
wlc_handle output;
|
||||
wlc_resource surface;
|
||||
struct wl_resource *resource;
|
||||
};
|
||||
|
||||
struct desktop_shell_state {
|
||||
|
|
@ -22,6 +25,12 @@ struct desktop_shell_state {
|
|||
struct wlc_size panel_size;
|
||||
};
|
||||
|
||||
struct swaylock_state {
|
||||
bool active;
|
||||
wlc_handle output;
|
||||
wlc_resource surface;
|
||||
};
|
||||
|
||||
extern struct desktop_shell_state desktop_shell;
|
||||
|
||||
void register_extensions(void);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue