diff options
-rw-r--r-- | include/config.h | 8 | ||||
-rw-r--r-- | sway/config.c | 2 | ||||
-rw-r--r-- | sway/focus.c | 8 | ||||
-rw-r--r-- | sway/handlers.c | 2 |
4 files changed, 13 insertions, 7 deletions
diff --git a/include/config.h b/include/config.h index b9511aac..9243bf35 100644 --- a/include/config.h +++ b/include/config.h | |||
@@ -33,17 +33,17 @@ struct sway_config { | |||
33 | list_t *cmd_queue; | 33 | list_t *cmd_queue; |
34 | list_t *workspace_outputs; | 34 | list_t *workspace_outputs; |
35 | struct sway_mode *current_mode; | 35 | struct sway_mode *current_mode; |
36 | uint32_t floating_mod; | 36 | uint32_t floating_mod; |
37 | 37 | ||
38 | // Flags | 38 | // Flags |
39 | bool focus_follows_mouse; | 39 | bool focus_follows_mouse; |
40 | bool mouse_warping; | 40 | bool mouse_warping; |
41 | bool active; | 41 | bool active; |
42 | bool failed; | 42 | bool failed; |
43 | bool reloading; | 43 | bool reloading; |
44 | }; | 44 | }; |
45 | 45 | ||
46 | bool load_config(); | 46 | bool load_config(void); |
47 | bool read_config(FILE *file, bool is_active); | 47 | bool read_config(FILE *file, bool is_active); |
48 | char *do_var_replacement(struct sway_config *config, char *str); | 48 | char *do_var_replacement(struct sway_config *config, char *str); |
49 | 49 | ||
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() { | |||
126 | return NULL; | 126 | return NULL; |
127 | } | 127 | } |
128 | 128 | ||
129 | bool load_config() { | 129 | bool load_config(void) { |
130 | sway_log(L_INFO, "Loading config"); | 130 | sway_log(L_INFO, "Loading config"); |
131 | 131 | ||
132 | char *path = get_config_path(); | 132 | 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) { | |||
33 | } | 33 | } |
34 | active_workspace = c; | 34 | active_workspace = c; |
35 | break; | 35 | break; |
36 | default: | ||
36 | case C_VIEW: | 37 | case C_VIEW: |
37 | case C_CONTAINER: | 38 | case C_CONTAINER: |
38 | //TODO whatever to do when container changes | 39 | //TODO whatever to do when container changes |
39 | //for example, stacked and tabbing change whatever. | 40 | //for example, stacked and tabbing change stuff. |
40 | break; | 41 | break; |
41 | } | 42 | } |
42 | } | 43 | } |
@@ -114,6 +115,11 @@ swayc_t *get_focused_container(swayc_t *parent) { | |||
114 | while (parent && !parent->is_focused) { | 115 | while (parent && !parent->is_focused) { |
115 | parent = parent->focused; | 116 | parent = parent->focused; |
116 | } | 117 | } |
118 | //just incase | ||
119 | if (parent == NULL) { | ||
120 | sway_log(L_DEBUG, "get_focused_container unable to find container"); | ||
121 | return active_workspace; | ||
122 | } | ||
117 | return parent; | 123 | return parent; |
118 | } | 124 | } |
119 | 125 | ||
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 | |||
252 | static bool handle_key(wlc_handle view, uint32_t time, const struct wlc_modifiers | 252 | static bool handle_key(wlc_handle view, uint32_t time, const struct wlc_modifiers |
253 | *modifiers, uint32_t key, uint32_t sym, enum wlc_key_state state) { | 253 | *modifiers, uint32_t key, uint32_t sym, enum wlc_key_state state) { |
254 | enum { QSIZE = 32 }; | 254 | enum { QSIZE = 32 }; |
255 | if (locked_view_focus) { | 255 | if (locked_view_focus && state == WLC_KEY_STATE_PRESSED) { |
256 | return false; | 256 | return false; |
257 | } | 257 | } |
258 | static uint8_t head = 0; | 258 | static uint8_t head = 0; |