summaryrefslogtreecommitdiffstats
path: root/sway/config/output.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/config/output.c')
-rw-r--r--sway/config/output.c19
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
491static 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
509static bool _spawn_swaybg(char **command) { 490static 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);