aboutsummaryrefslogtreecommitdiff
path: root/sway
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2017-07-04 16:00:13 -0400
committerDrew DeVault <sir@cmpwn.com>2017-07-04 16:02:54 -0400
commit23a1e944027265c70654d7395362641b59428062 (patch)
tree65ddb77c3b3879cb971fa5bc550316ef7041b7d3 /sway
parent496cec3cb7ba9e2648d023b8bda09a79d1d958ed (diff)
Make asciidoc (and man pages) optional
And remove it from the build
Diffstat (limited to 'sway')
-rw-r--r--sway/CMakeLists.txt12
-rw-r--r--sway/handlers.c8
2 files changed, 15 insertions, 5 deletions
diff --git a/sway/CMakeLists.txt b/sway/CMakeLists.txt
index 981f8a07..bf0b2e7f 100644
--- a/sway/CMakeLists.txt
+++ b/sway/CMakeLists.txt
@@ -93,8 +93,10 @@ endfunction()
add_config(config config sway)
add_config(00-defaults security.d/00-defaults sway/security.d)
-add_manpage(sway 1)
-add_manpage(sway 5)
-add_manpage(sway-input 5)
-add_manpage(sway-bar 5)
-add_manpage(sway-security 7)
+if (A2X_FOUND)
+ add_manpage(sway 1)
+ add_manpage(sway 5)
+ add_manpage(sway-input 5)
+ add_manpage(sway-bar 5)
+ add_manpage(sway-security 7)
+endif()
diff --git a/sway/handlers.c b/sway/handlers.c
index 39261e3d..052789ca 100644
--- a/sway/handlers.c
+++ b/sway/handlers.c
@@ -1084,8 +1084,16 @@ bool handle_pointer_scroll(wlc_handle view, uint32_t time, const struct wlc_modi
return EVENT_PASSTHROUGH;
}
+static void clip_test_cb(void *data, const char *type, int fd) {
+ const char *str = data;
+ write(fd, str, strlen(str));
+ close(fd);
+}
+
static void handle_wlc_ready(void) {
sway_log(L_DEBUG, "Compositor is ready, executing cmds in queue");
+ const char *type = "text/plain;charset=utf-8";
+ wlc_set_selection("test", &type, 1, &clip_test_cb);
// Execute commands until there are none left
config->active = true;
while (config->cmd_queue->length) {