aboutsummaryrefslogtreecommitdiffstats
path: root/sway
diff options
context:
space:
mode:
authorLibravatar taiyu <taiyu.len@gmail.com>2015-08-20 05:08:04 -0700
committerLibravatar taiyu <taiyu.len@gmail.com>2015-08-20 05:08:04 -0700
commit927ef0a5ecbd5fae71e862cdd9b6c83fa1c481d8 (patch)
treefa696b1ab1925041fa744d1c56c8e2c30201f076 /sway
parentstyle (diff)
parentMerge pull request #97 from taiyu-len/master (diff)
downloadsway-927ef0a5ecbd5fae71e862cdd9b6c83fa1c481d8.tar.gz
sway-927ef0a5ecbd5fae71e862cdd9b6c83fa1c481d8.tar.zst
sway-927ef0a5ecbd5fae71e862cdd9b6c83fa1c481d8.zip
Merge branch 'master' of https://github.com/SirCmpwn/sway
merging
Diffstat (limited to 'sway')
-rw-r--r--sway/container.c2
-rw-r--r--sway/handlers.c15
-rw-r--r--sway/layout.c8
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) {
66 output->height = size->h; 66 output->height = size->h;
67 output->handle = handle; 67 output->handle = handle;
68 output->name = name ? strdup(name) : NULL; 68 output->name = name ? strdup(name) : NULL;
69 output->gaps = config->gaps_outer; 69 output->gaps = config->gaps_outer + config->gaps_inner / 2;
70 70
71 add_child(&root_container, output); 71 add_child(&root_container, output);
72 72
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
286static bool handle_key(wlc_handle view, uint32_t time, const struct wlc_modifiers *modifiers, 286static bool handle_key(wlc_handle view, uint32_t time, const struct wlc_modifiers *modifiers,
287 uint32_t key, uint32_t sym, enum wlc_key_state state) { 287 uint32_t key, uint32_t sym, enum wlc_key_state state) {
288 288
289 static const uint32_t modifier_syms[] = {
290 XKB_KEY_Shift_L, XKB_KEY_Shift_R, XKB_KEY_Control_L, XKB_KEY_Control_R,
291 XKB_KEY_Caps_Lock, XKB_KEY_Shift_Lock, XKB_KEY_Meta_L, XKB_KEY_Meta_R,
292 XKB_KEY_Alt_L, XKB_KEY_Alt_R, XKB_KEY_Super_L, XKB_KEY_Super_R,
293 XKB_KEY_Hyper_L, XKB_KEY_Hyper_R
294 };
295
296 if (locked_view_focus && state == WLC_KEY_STATE_PRESSED) { 289 if (locked_view_focus && state == WLC_KEY_STATE_PRESSED) {
297 return false; 290 return false;
298 } 291 }
@@ -316,14 +309,6 @@ static bool handle_key(wlc_handle view, uint32_t time, const struct wlc_modifier
316 sym = tolower(sym); 309 sym = tolower(sym);
317 310
318 int i; 311 int i;
319 bool mod = false;
320
321 for (i = 0; i < sizeof(modifier_syms) / sizeof(uint32_t); ++i) {
322 if (modifier_syms[i] == sym) {
323 mod = true;
324 break;
325 }
326 }
327 312
328 if (state == WLC_KEY_STATE_PRESSED) { 313 if (state == WLC_KEY_STATE_PRESSED) {
329 press_key(sym); 314 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) {
152 { 152 {
153 struct wlc_geometry geometry = { 153 struct wlc_geometry geometry = {
154 .origin = { 154 .origin = {
155 .x = container->x + container->gaps, 155 .x = container->x + container->gaps / 2,
156 .y = container->y + container->gaps 156 .y = container->y + container->gaps / 2
157 }, 157 },
158 .size = { 158 .size = {
159 .w = width - container->gaps * 2, 159 .w = width - container->gaps,
160 .h = height - container->gaps * 2 160 .h = height - container->gaps
161 } 161 }
162 }; 162 };
163 if (wlc_view_get_state(container->handle) & WLC_BIT_FULLSCREEN) { 163 if (wlc_view_get_state(container->handle) & WLC_BIT_FULLSCREEN) {