This commit is contained in:
Tobias Bengfort 2025-10-26 09:46:11 +01:00 committed by GitHub
commit 607808c2be
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 208 additions and 8 deletions

View file

@ -18,6 +18,7 @@ struct action {
*/
uint32_t type; /* enum action_type */
uint32_t permissions; /* enum lab_permission */
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

@ -71,6 +71,7 @@ struct rcxml {
enum tearing_mode allow_tearing;
bool auto_enable_outputs;
bool reuse_output_mode;
uint32_t default_permissions;
bool xwayland_persistence;
bool primary_selection;
char *prompt_command;
@ -187,6 +188,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;

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>
uint32_t permissions_from_interface_name(const char *s);
int permissions_context_create(struct wl_display *display, uint32_t permissions);
bool permissions_check(const struct wl_client *client, const struct wl_interface *iface);
#endif