diff options
author | Brian Ashworth <bosrsf04@gmail.com> | 2019-04-14 00:27:47 -0400 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2019-04-14 12:41:59 +0300 |
commit | 6961bf2e4ce2c116e41a8db158691f6c993707ce (patch) | |
tree | a381146599a5f19e565006cafeb23edc04247d2b /sway/config/output.c | |
parent | swaynag: fix pointer management (diff) | |
download | sway-6961bf2e4ce2c116e41a8db158691f6c993707ce.tar.gz sway-6961bf2e4ce2c116e41a8db158691f6c993707ce.tar.zst sway-6961bf2e4ce2c116e41a8db158691f6c993707ce.zip |
Spawn swaynag as a wayland client
This spawns swaynag as a wayland client similar to how swaybar and
swaybg are already done
Diffstat (limited to 'sway/config/output.c')
-rw-r--r-- | sway/config/output.c | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/sway/config/output.c b/sway/config/output.c index 747ab28b..fb8a9ee5 100644 --- a/sway/config/output.c +++ b/sway/config/output.c | |||
@@ -1,6 +1,5 @@ | |||
1 | #define _POSIX_C_SOURCE 200809L | 1 | #define _POSIX_C_SOURCE 200809L |
2 | #include <assert.h> | 2 | #include <assert.h> |
3 | #include <fcntl.h> | ||
4 | #include <stdbool.h> | 3 | #include <stdbool.h> |
5 | #include <string.h> | 4 | #include <string.h> |
6 | #include <sys/socket.h> | 5 | #include <sys/socket.h> |
@@ -488,24 +487,6 @@ static void handle_swaybg_client_destroy(struct wl_listener *listener, | |||
488 | config->swaybg_client = NULL; | 487 | config->swaybg_client = NULL; |
489 | } | 488 | } |
490 | 489 | ||
491 | static bool set_cloexec(int fd, bool cloexec) { | ||
492 | int flags = fcntl(fd, F_GETFD); | ||
493 | if (flags == -1) { | ||
494 | sway_log_errno(SWAY_ERROR, "fcntl failed"); | ||
495 | return false; | ||
496 | } | ||
497 | if (cloexec) { | ||
498 | flags = flags | FD_CLOEXEC; | ||
499 | } else { | ||
500 | flags = flags & ~FD_CLOEXEC; | ||
501 | } | ||
502 | if (fcntl(fd, F_SETFD, flags) == -1) { | ||
503 | sway_log_errno(SWAY_ERROR, "fcntl failed"); | ||
504 | return false; | ||
505 | } | ||
506 | return true; | ||
507 | } | ||
508 | |||
509 | static bool _spawn_swaybg(char **command) { | 490 | static bool _spawn_swaybg(char **command) { |
510 | if (config->swaybg_client != NULL) { | 491 | if (config->swaybg_client != NULL) { |
511 | wl_client_destroy(config->swaybg_client); | 492 | wl_client_destroy(config->swaybg_client); |