diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-11-15 16:53:10 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-11-15 17:06:43 +0900 |
| commit | 41b49137a8d11183c0d13ea32527f58f9c1a3dec (patch) | |
| tree | 4b632dd654770bc55c409f8da671c89658f84ceb /internal/wayland | |
| parent | c761e1de4dcf87b9106e4f70cb89217a81aa2f9f (diff) | |
.clang-format: do not limit line length
This hard limit destroys readability in some places.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/wayland')
| -rw-r--r-- | internal/wayland/wayland-client-helper.c | 33 | ||||
| -rw-r--r-- | internal/wayland/wayland-client-helper.h | 8 |
2 files changed, 25 insertions, 16 deletions
diff --git a/internal/wayland/wayland-client-helper.c b/internal/wayland/wayland-client-helper.c index 5a2c9a01..b1fcca92 100644 --- a/internal/wayland/wayland-client-helper.c +++ b/internal/wayland/wayland-client-helper.c @@ -9,27 +9,34 @@ #include "security-context-v1-protocol.h" #include <wayland-client.h> -static void registry_handle_global(void *data, struct wl_registry *registry, - uint32_t name, const char *interface, - uint32_t version) { +static void registry_handle_global( + void *data, + struct wl_registry *registry, + uint32_t name, + const char *interface, + uint32_t version) { struct wp_security_context_manager_v1 **out = data; if (strcmp(interface, wp_security_context_manager_v1_interface.name) == 0) - *out = wl_registry_bind(registry, name, - &wp_security_context_manager_v1_interface, 1); + *out = wl_registry_bind(registry, name, &wp_security_context_manager_v1_interface, 1); } -static void registry_handle_global_remove(void *data, - struct wl_registry *registry, - uint32_t name) {} /* no-op */ +static void registry_handle_global_remove( + void *data, + struct wl_registry *registry, + uint32_t name) {} /* no-op */ static const struct wl_registry_listener registry_listener = { .global = registry_handle_global, .global_remove = registry_handle_global_remove, }; -int32_t hakurei_bind_wayland_fd(char *socket_path, int fd, const char *app_id, - const char *instance_id, int sync_fd) { +int32_t hakurei_bind_wayland_fd( + char *socket_path, + int fd, + const char *app_id, + const char *instance_id, + int sync_fd) { int32_t res = 0; /* refer to resErr for corresponding Go error */ struct wl_display *display; @@ -43,8 +50,7 @@ int32_t hakurei_bind_wayland_fd(char *socket_path, int fd, const char *app_id, registry = wl_display_get_registry(display); struct wp_security_context_manager_v1 *security_context_manager = NULL; - wl_registry_add_listener(registry, ®istry_listener, - &security_context_manager); + wl_registry_add_listener(registry, ®istry_listener, &security_context_manager); int ret; ret = wl_display_roundtrip(display); wl_registry_destroy(registry); @@ -71,8 +77,7 @@ int32_t hakurei_bind_wayland_fd(char *socket_path, int fd, const char *app_id, goto out; struct wp_security_context_v1 *security_context; - security_context = wp_security_context_manager_v1_create_listener( - security_context_manager, listen_fd, sync_fd); + security_context = wp_security_context_manager_v1_create_listener(security_context_manager, listen_fd, sync_fd); wp_security_context_v1_set_sandbox_engine(security_context, "app.hakurei"); wp_security_context_v1_set_app_id(security_context, app_id); wp_security_context_v1_set_instance_id(security_context, instance_id); diff --git a/internal/wayland/wayland-client-helper.h b/internal/wayland/wayland-client-helper.h index eae8936d..6ed93a4a 100644 --- a/internal/wayland/wayland-client-helper.h +++ b/internal/wayland/wayland-client-helper.h @@ -1,4 +1,8 @@ #include <stdint.h> -int32_t hakurei_bind_wayland_fd(char *socket_path, int fd, const char *app_id, - const char *instance_id, int sync_fd);
\ No newline at end of file +int32_t hakurei_bind_wayland_fd( + char *socket_path, + int fd, + const char *app_id, + const char *instance_id, + int sync_fd); |
