diff options
author | taiyu <taiyu.len@gmail.com> | 2015-08-20 05:08:04 -0700 |
---|---|---|
committer | taiyu <taiyu.len@gmail.com> | 2015-08-20 05:08:04 -0700 |
commit | 927ef0a5ecbd5fae71e862cdd9b6c83fa1c481d8 (patch) | |
tree | fa696b1ab1925041fa744d1c56c8e2c30201f076 | |
parent | f5fde7c45c04b02406eabc34cbb4248189c6a26e (diff) | |
parent | 95f5660897b6640f13623178651f45549a917efb (diff) |
Merge branch 'master' of https://github.com/SirCmpwn/sway
merging
-rw-r--r-- | sway/container.c | 2 | ||||
-rw-r--r-- | sway/handlers.c | 15 | ||||
-rw-r--r-- | sway/layout.c | 8 |
3 files changed, 5 insertions, 20 deletions
diff --git a/sway/container.c b/sway/container.c index 7da33b48..4559a5f5 100644 --- a/sway/container.c +++ b/sway/container.c @@ -66,7 +66,7 @@ swayc_t *new_output(wlc_handle handle) { output->height = size->h; output->handle = handle; output->name = name ? strdup(name) : NULL; - output->gaps = config->gaps_outer; + output->gaps = config->gaps_outer + config->gaps_inner / 2; add_child(&root_container, output); diff --git a/sway/handlers.c b/sway/handlers.c index 2f062911..5993223d 100644 --- a/sway/handlers.c +++ b/sway/handlers.c @@ -286,13 +286,6 @@ static void handle_view_state_request(wlc_handle view, enum wlc_view_state_bit s static bool handle_key(wlc_handle view, uint32_t time, const struct wlc_modifiers *modifiers, uint32_t key, uint32_t sym, enum wlc_key_state state) { - static const uint32_t modifier_syms[] = { - XKB_KEY_Shift_L, XKB_KEY_Shift_R, XKB_KEY_Control_L, XKB_KEY_Control_R, - XKB_KEY_Caps_Lock, XKB_KEY_Shift_Lock, XKB_KEY_Meta_L, XKB_KEY_Meta_R, - XKB_KEY_Alt_L, XKB_KEY_Alt_R, XKB_KEY_Super_L, XKB_KEY_Super_R, - XKB_KEY_Hyper_L, XKB_KEY_Hyper_R - }; - if (locked_view_focus && state == WLC_KEY_STATE_PRESSED) { return false; } @@ -316,14 +309,6 @@ static bool handle_key(wlc_handle view, uint32_t time, const struct wlc_modifier sym = tolower(sym); int i; - bool mod = false; - - for (i = 0; i < sizeof(modifier_syms) / sizeof(uint32_t); ++i) { - if (modifier_syms[i] == sym) { - mod = true; - break; - } - } if (state == WLC_KEY_STATE_PRESSED) { press_key(sym); diff --git a/sway/layout.c b/sway/layout.c index 4a9aa907..78b3dd27 100644 --- a/sway/layout.c +++ b/sway/layout.c @@ -152,12 +152,12 @@ void arrange_windows(swayc_t *container, int width, int height) { { struct wlc_geometry geometry = { .origin = { - .x = container->x + container->gaps, - .y = container->y + container->gaps + .x = container->x + container->gaps / 2, + .y = container->y + container->gaps / 2 }, .size = { - .w = width - container->gaps * 2, - .h = height - container->gaps * 2 + .w = width - container->gaps, + .h = height - container->gaps } }; if (wlc_view_get_state(container->handle) & WLC_BIT_FULLSCREEN) { |