diff options
Diffstat (limited to 'sway')
-rw-r--r-- | sway/config.c | 2 | ||||
-rw-r--r-- | sway/focus.c | 8 | ||||
-rw-r--r-- | sway/handlers.c | 2 |
3 files changed, 9 insertions, 3 deletions
diff --git a/sway/config.c b/sway/config.c index f06d55f8..4125f4cd 100644 --- a/sway/config.c +++ b/sway/config.c @@ -126,7 +126,7 @@ static char* get_config_path() { return NULL; } -bool load_config() { +bool load_config(void) { sway_log(L_INFO, "Loading config"); char *path = get_config_path(); diff --git a/sway/focus.c b/sway/focus.c index 4f57f252..14d27184 100644 --- a/sway/focus.c +++ b/sway/focus.c @@ -33,10 +33,11 @@ static void update_focus(swayc_t *c) { } active_workspace = c; break; + default: case C_VIEW: case C_CONTAINER: //TODO whatever to do when container changes - //for example, stacked and tabbing change whatever. + //for example, stacked and tabbing change stuff. break; } } @@ -114,6 +115,11 @@ swayc_t *get_focused_container(swayc_t *parent) { while (parent && !parent->is_focused) { parent = parent->focused; } + //just incase + if (parent == NULL) { + sway_log(L_DEBUG, "get_focused_container unable to find container"); + return active_workspace; + } return parent; } diff --git a/sway/handlers.c b/sway/handlers.c index 24e8e014..0157d466 100644 --- a/sway/handlers.c +++ b/sway/handlers.c @@ -252,7 +252,7 @@ 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) { enum { QSIZE = 32 }; - if (locked_view_focus) { + if (locked_view_focus && state == WLC_KEY_STATE_PRESSED) { return false; } static uint8_t head = 0; |