This commit is contained in:
Tobias Bengfort 2026-04-14 22:23:48 +01:00 committed by GitHub
commit 3b0d4e219d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
19 changed files with 327 additions and 11 deletions

View file

@ -18,6 +18,7 @@ struct action {
*/
uint32_t type; /* enum action_type */
uint32_t allowed_interfaces;
struct wl_list args; /* struct action_arg.link */
};

View file

@ -2,8 +2,15 @@
#ifndef LABWC_SPAWN_H
#define LABWC_SPAWN_H
#include <stdbool.h>
#include <sys/types.h>
/**
* set_cloexec - set file descriptor to close on exit
* @fd: file descriptor
*/
bool set_cloexec(int fd);
/**
* spawn_primary_client - execute asynchronously
* @command: command to be executed
@ -14,7 +21,7 @@ pid_t spawn_primary_client(const char *command);
* spawn_async_no_shell - execute asynchronously
* @command: command to be executed
*/
void spawn_async_no_shell(char const *command);
void spawn_async_no_shell(char const *command, int socket_fd);
/**
* spawn_piped - execute asynchronously

View file

@ -202,6 +202,8 @@ struct rcxml {
struct wl_list window_rules; /* struct window_rule.link */
struct wl_list autostart; /* struct action.link */
/* Menu */
unsigned int menu_ignore_button_release_period;
bool menu_show_icons;

View file

@ -298,6 +298,7 @@ struct server {
struct wlr_tablet_manager_v2 *tablet_manager;
struct wlr_security_context_manager_v1 *security_context_manager_v1;
struct ext_socket_manager_v1 *ext_socket_manager_v1;
/* Set when in cycle (alt-tab) mode */
struct cycle_state cycle;

12
include/permissions.h Normal file
View file

@ -0,0 +1,12 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#ifndef LABWC_PERMISSIONS_H
#define LABWC_PERMISSIONS_H
#include <wayland-server-core.h>
#include <stdbool.h>
int permissions_context_create(struct wl_display *display, uint32_t permissions);
bool permissions_context_clone(struct wl_client *client, int fd);
bool permissions_check(const struct wl_client *client, const struct wl_interface *iface);
#endif

View file

@ -0,0 +1,21 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#ifndef LABWC_PROTOCOLS_EXT_SOCKET_MANAGER_H
#define LABWC_PROTOCOLS_EXT_SOCKET_MANAGER_H
#include <wayland-server-core.h>
struct ext_socket_manager_v1 {
struct wl_global *global;
struct {
struct wl_signal destroy;
struct wl_signal register_socket;
} events;
struct wl_listener display_destroy;
};
struct ext_socket_manager_v1 *ext_socket_manager_v1_create(
struct wl_display *display);
#endif