summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2016-12-02 16:01:33 -0500
committerLibravatar Drew DeVault <sir@cmpwn.com>2016-12-02 16:01:33 -0500
commit0a1b211e09e9fc82885eaf12c0a3658d36c0bec0 (patch)
tree25ed38ee679ab4e92df4c875b288185e53a3533a
parentRun config files through sed and install to /etc (diff)
downloadsway-0a1b211e09e9fc82885eaf12c0a3658d36c0bec0.tar.gz
sway-0a1b211e09e9fc82885eaf12c0a3658d36c0bec0.tar.zst
sway-0a1b211e09e9fc82885eaf12c0a3658d36c0bec0.zip
Drop -Denable-binding-event
-rw-r--r--CMakeLists.txt4
-rw-r--r--sway/ipc-server.c6
2 files changed, 0 insertions, 10 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index cd816e9b..e314fd73 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -45,7 +45,6 @@ option(enable-swaybar "Enables the swaybar utility" YES)
45option(enable-swaygrab "Enables the swaygrab utility" YES) 45option(enable-swaygrab "Enables the swaygrab utility" YES)
46option(enable-swaymsg "Enables the swaymsg utility" YES) 46option(enable-swaymsg "Enables the swaymsg utility" YES)
47option(enable-gdk-pixbuf "Use Pixbuf to support more image formats" YES) 47option(enable-gdk-pixbuf "Use Pixbuf to support more image formats" YES)
48option(enable-binding-event "Enables binding event subscription" YES)
49option(zsh-completions "Zsh shell completions" NO) 48option(zsh-completions "Zsh shell completions" NO)
50option(default-wallpaper "Installs the default wallpaper" YES) 49option(default-wallpaper "Installs the default wallpaper" YES)
51option(ld-library-path "Configures sway's default LD_LIBRARY_PATH" "/usr/lib") 50option(ld-library-path "Configures sway's default LD_LIBRARY_PATH" "/usr/lib")
@@ -86,9 +85,6 @@ if (enable-gdk-pixbuf)
86else() 85else()
87 message(STATUS "Building without gdk-pixbuf, only png images supported.") 86 message(STATUS "Building without gdk-pixbuf, only png images supported.")
88endif() 87endif()
89if(enable-binding-event)
90 add_definitions(-DSWAY_BINDING_EVENT=1)
91endif()
92 88
93include_directories(include) 89include_directories(include)
94 90
diff --git a/sway/ipc-server.c b/sway/ipc-server.c
index e575081b..0442a2f9 100644
--- a/sway/ipc-server.c
+++ b/sway/ipc-server.c
@@ -343,10 +343,8 @@ void ipc_client_handle_command(struct ipc_client *client) {
343 client->subscribed_events |= event_mask(IPC_EVENT_WINDOW); 343 client->subscribed_events |= event_mask(IPC_EVENT_WINDOW);
344 } else if (strcmp(event_type, "modifier") == 0) { 344 } else if (strcmp(event_type, "modifier") == 0) {
345 client->subscribed_events |= event_mask(IPC_EVENT_MODIFIER); 345 client->subscribed_events |= event_mask(IPC_EVENT_MODIFIER);
346#if SWAY_BINDING_EVENT
347 } else if (strcmp(event_type, "binding") == 0) { 346 } else if (strcmp(event_type, "binding") == 0) {
348 client->subscribed_events |= event_mask(IPC_EVENT_BINDING); 347 client->subscribed_events |= event_mask(IPC_EVENT_BINDING);
349#endif
350 } else { 348 } else {
351 ipc_send_reply(client, "{\"success\": false}", 18); 349 ipc_send_reply(client, "{\"success\": false}", 18);
352 json_object_put(request); 350 json_object_put(request);
@@ -639,7 +637,6 @@ void ipc_event_modifier(uint32_t modifier, const char *state) {
639 json_object_put(obj); // free 637 json_object_put(obj); // free
640} 638}
641 639
642#if SWAY_BINDING_EVENT
643static void ipc_event_binding(json_object *sb_obj) { 640static void ipc_event_binding(json_object *sb_obj) {
644 sway_log(L_DEBUG, "Sending binding::run event"); 641 sway_log(L_DEBUG, "Sending binding::run event");
645 json_object *obj = json_object_new_object(); 642 json_object *obj = json_object_new_object();
@@ -651,10 +648,8 @@ static void ipc_event_binding(json_object *sb_obj) {
651 648
652 json_object_put(obj); // free 649 json_object_put(obj); // free
653} 650}
654#endif
655 651
656void ipc_event_binding_keyboard(struct sway_binding *sb) { 652void ipc_event_binding_keyboard(struct sway_binding *sb) {
657#if SWAY_BINDING_EVENT
658 json_object *sb_obj = json_object_new_object(); 653 json_object *sb_obj = json_object_new_object();
659 json_object_object_add(sb_obj, "command", json_object_new_string(sb->command)); 654 json_object_object_add(sb_obj, "command", json_object_new_string(sb->command));
660 655
@@ -705,5 +700,4 @@ void ipc_event_binding_keyboard(struct sway_binding *sb) {
705 json_object_object_add(sb_obj, "input_type", json_object_new_string("keyboard")); 700 json_object_object_add(sb_obj, "input_type", json_object_new_string("keyboard"));
706 701
707 ipc_event_binding(sb_obj); 702 ipc_event_binding(sb_obj);
708#endif
709} 703}