aboutsummaryrefslogtreecommitdiff
path: root/sway/handlers.c
diff options
context:
space:
mode:
authorMykyta Holubakha <hilobakho@gmail.com>2016-05-08 17:17:35 +0300
committerMykyta Holubakha <hilobakho@gmail.com>2016-05-08 17:17:35 +0300
commit0c495eecde82c3b7a2827c713badfd13536f5507 (patch)
treeed2cbb25cb60138bac65178e50ab9cf717dad787 /sway/handlers.c
parent394a5d36cb5ac7f1d711fb4d02275ff4523b62bf (diff)
Remove FSB_GAPS_INNER and FSB_GAPS_OUTER
Diffstat (limited to 'sway/handlers.c')
-rw-r--r--sway/handlers.c35
1 files changed, 5 insertions, 30 deletions
diff --git a/sway/handlers.c b/sway/handlers.c
index 23c9985e..67275575 100644
--- a/sway/handlers.c
+++ b/sway/handlers.c
@@ -723,36 +723,11 @@ static bool handle_pointer_button(wlc_handle view, uint32_t time, const struct w
bool handle_pointer_scroll(wlc_handle view, uint32_t time, const struct wlc_modifiers* modifiers,
uint8_t axis_bits, double _amount[2]) {
if (!(modifiers->mods ^ config->floating_mod)) {
- switch (config->floating_scroll) {
- case FSB_GAPS_INNER:
- case FSB_GAPS_OUTER:
- {
- int amount = (int)_amount[0];
- int i,j;
- for (i = 0; i < root_container.children->length; ++i) {
- swayc_t *op = root_container.children->items[i];
- for (j = 0; j < op->children->length; ++j) {
- swayc_t *ws = op->children->items[j];
- if (config->floating_scroll == FSB_GAPS_INNER) {
- container_map(ws, add_gaps, &amount);
- } else {
- ws->gaps += amount;
- }
- }
- }
- arrange_windows(&root_container, -1, -1);
- break;
- }
- case FSB_CUSTOM:
- {
- int amount = (int)_amount[0];
- if (amount > 0) {
- handle_command(config->fsb_up);
- } else if (amount < 0) {
- handle_command(config->fsb_down);
- }
- break;
- }
+ int amount = (int)_amount[0];
+ if (amount > 0) {
+ handle_command(config->floating_scroll_up_cmd);
+ } else if (amount < 0) {
+ handle_command(config->floating_scroll_down_cmd);
}
}
return EVENT_PASSTHROUGH;