summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Mikkel Oscar Lyderik <mikkeloscar@gmail.com>2016-04-02 19:09:12 +0200
committerLibravatar Mikkel Oscar Lyderik <mikkeloscar@gmail.com>2016-04-02 19:09:12 +0200
commit4885a6c423b9bcf4a60e57b32f528b9c90d09cd8 (patch)
tree89abbdf64bf6f8d9374afe9fc1f8cd4f5856d88b
parentMerge pull request #565 from mikkeloscar/fix-pointer-crash (diff)
parentFix spelling mistakes (diff)
downloadsway-4885a6c423b9bcf4a60e57b32f528b9c90d09cd8.tar.gz
sway-4885a6c423b9bcf4a60e57b32f528b9c90d09cd8.tar.zst
sway-4885a6c423b9bcf4a60e57b32f528b9c90d09cd8.zip
Merge pull request #569 from 1ace/master
Fix spelling mistakes
-rw-r--r--common/stringop.c2
-rw-r--r--include/ipc.h2
-rw-r--r--sway/commands.c6
-rw-r--r--sway/container.c2
-rw-r--r--sway/focus.c2
-rw-r--r--sway/handlers.c8
-rw-r--r--sway/input_state.c8
-rw-r--r--sway/layout.c2
8 files changed, 16 insertions, 16 deletions
diff --git a/common/stringop.c b/common/stringop.c
index 186fe121..61324458 100644
--- a/common/stringop.c
+++ b/common/stringop.c
@@ -342,7 +342,7 @@ char *cmdsep(char **stringp, const char *delim) {
342 char *head = *stringp + strspn(*stringp, delim); 342 char *head = *stringp + strspn(*stringp, delim);
343 // Find end token 343 // Find end token
344 char *tail = *stringp += strcspn(*stringp, delim); 344 char *tail = *stringp += strcspn(*stringp, delim);
345 // Set stringp to begining of next token 345 // Set stringp to beginning of next token
346 *stringp += strspn(*stringp, delim); 346 *stringp += strspn(*stringp, delim);
347 // Set stringp to null if last token 347 // Set stringp to null if last token
348 if (!**stringp) *stringp = NULL; 348 if (!**stringp) *stringp = NULL;
diff --git a/include/ipc.h b/include/ipc.h
index 06053190..21da2be3 100644
--- a/include/ipc.h
+++ b/include/ipc.h
@@ -11,7 +11,7 @@ enum ipc_command_type {
11 IPC_GET_BAR_CONFIG = 6, 11 IPC_GET_BAR_CONFIG = 6,
12 IPC_GET_VERSION = 7, 12 IPC_GET_VERSION = 7,
13 IPC_GET_INPUTS = 8, 13 IPC_GET_INPUTS = 8,
14 // Events send from sway to clients. Events have the higest bits set. 14 // Events send from sway to clients. Events have the highest bits set.
15 IPC_EVENT_WORKSPACE = (1 << (31 - 0)), 15 IPC_EVENT_WORKSPACE = (1 << (31 - 0)),
16 IPC_EVENT_OUTPUT = (1 << (31 - 1)), 16 IPC_EVENT_OUTPUT = (1 << (31 - 1)),
17 IPC_EVENT_MODE = (1 << (31 - 2)), 17 IPC_EVENT_MODE = (1 << (31 - 2)),
diff --git a/sway/commands.c b/sway/commands.c
index 3cc84062..c1009f85 100644
--- a/sway/commands.c
+++ b/sway/commands.c
@@ -758,7 +758,7 @@ static struct cmd_results *cmd_mode(int argc, char **argv) {
758 break; 758 break;
759 } 759 }
760 } 760 }
761 // Create mode if it doesnt exist 761 // Create mode if it doesn't exist
762 if (!mode && mode_make) { 762 if (!mode && mode_make) {
763 mode = malloc(sizeof*mode); 763 mode = malloc(sizeof*mode);
764 mode->name = strdup(mode_name); 764 mode->name = strdup(mode_name);
@@ -1917,7 +1917,7 @@ static struct cmd_results *_do_split(int argc, char **argv, int layout) {
1917 } 1917 }
1918 swayc_t *focused = get_focused_container(&root_container); 1918 swayc_t *focused = get_focused_container(&root_container);
1919 1919
1920 // Case of floating window, dont split 1920 // Case of floating window, don't split
1921 if (focused->is_floating) { 1921 if (focused->is_floating) {
1922 return cmd_results_new(CMD_SUCCESS, NULL, NULL); 1922 return cmd_results_new(CMD_SUCCESS, NULL, NULL);
1923 } 1923 }
@@ -2164,7 +2164,7 @@ static struct cmd_results *cmd_workspace(int argc, char **argv) {
2164 sway_log(L_DEBUG, "Assigning workspace %s to output %s", argv[0], argv[2]); 2164 sway_log(L_DEBUG, "Assigning workspace %s to output %s", argv[0], argv[2]);
2165 list_add(config->workspace_outputs, wso); 2165 list_add(config->workspace_outputs, wso);
2166 if (!config->reading) { 2166 if (!config->reading) {
2167 // TODO: Move workspace to output. (dont do so when reloading) 2167 // TODO: Move workspace to output. (don't do so when reloading)
2168 } 2168 }
2169 } 2169 }
2170 } 2170 }
diff --git a/sway/container.c b/sway/container.c
index 5d43b418..d82a1e21 100644
--- a/sway/container.c
+++ b/sway/container.c
@@ -146,7 +146,7 @@ swayc_t *new_output(wlc_handle handle) {
146 ws_name = workspace_next_name(output->name); 146 ws_name = workspace_next_name(output->name);
147 } 147 }
148 148
149 // create and initilize default workspace 149 // create and initialize default workspace
150 swayc_t *ws = new_workspace(output, ws_name); 150 swayc_t *ws = new_workspace(output, ws_name);
151 ws->is_focused = true; 151 ws->is_focused = true;
152 152
diff --git a/sway/focus.c b/sway/focus.c
index 0c9719b0..93391c63 100644
--- a/sway/focus.c
+++ b/sway/focus.c
@@ -24,7 +24,7 @@ static void update_focus(swayc_t *c) {
24 parent->focused = c; 24 parent->focused = c;
25 25
26 switch (c->type) { 26 switch (c->type) {
27 // Shouldnt happen 27 // Shouldn't happen
28 case C_ROOT: return; 28 case C_ROOT: return;
29 29
30 // Case where output changes 30 // Case where output changes
diff --git a/sway/handlers.c b/sway/handlers.c
index ee88b247..f96a8e9d 100644
--- a/sway/handlers.c
+++ b/sway/handlers.c
@@ -166,7 +166,7 @@ static void handle_output_resolution_change(wlc_handle output, const struct wlc_
166 166
167static void handle_output_focused(wlc_handle output, bool focus) { 167static void handle_output_focused(wlc_handle output, bool focus) {
168 swayc_t *c = swayc_by_handle(output); 168 swayc_t *c = swayc_by_handle(output);
169 // if for some reason this output doesnt exist, create it. 169 // if for some reason this output doesn't exist, create it.
170 if (!c) { 170 if (!c) {
171 handle_output_created(output); 171 handle_output_created(output);
172 } 172 }
@@ -217,7 +217,7 @@ static bool handle_view_created(wlc_handle handle) {
217 wlc_view_set_state(handle, WLC_BIT_MAXIMIZED, true); 217 wlc_view_set_state(handle, WLC_BIT_MAXIMIZED, true);
218 break; 218 break;
219 219
220 // Dmenu keeps viewfocus, but others with this flag dont, for now simulate 220 // Dmenu keeps viewfocus, but others with this flag don't, for now simulate
221 // dmenu 221 // dmenu
222 case WLC_BIT_OVERRIDE_REDIRECT: 222 case WLC_BIT_OVERRIDE_REDIRECT:
223// locked_view_focus = true; 223// locked_view_focus = true;
@@ -288,7 +288,7 @@ static void handle_view_destroyed(wlc_handle handle) {
288 case WLC_BIT_POPUP: 288 case WLC_BIT_POPUP:
289 break; 289 break;
290 // DMENU has this flag, and takes view_focus, but other things with this 290 // DMENU has this flag, and takes view_focus, but other things with this
291 // flag dont 291 // flag don't
292 case WLC_BIT_OVERRIDE_REDIRECT: 292 case WLC_BIT_OVERRIDE_REDIRECT:
293// locked_view_focus = false; 293// locked_view_focus = false;
294 break; 294 break;
@@ -651,7 +651,7 @@ static bool handle_pointer_button(wlc_handle view, uint32_t time, const struct w
651 // get focused window and check if to change focus on mouse click 651 // get focused window and check if to change focus on mouse click
652 swayc_t *focused = get_focused_container(&root_container); 652 swayc_t *focused = get_focused_container(&root_container);
653 653
654 // dont change focus or mode if fullscreen 654 // don't change focus or mode if fullscreen
655 if (swayc_is_fullscreen(focused)) { 655 if (swayc_is_fullscreen(focused)) {
656 return EVENT_PASSTHROUGH; 656 return EVENT_PASSTHROUGH;
657 } 657 }
diff --git a/sway/input_state.c b/sway/input_state.c
index cb71673e..429b2f34 100644
--- a/sway/input_state.c
+++ b/sway/input_state.c
@@ -96,7 +96,7 @@ void press_key(uint32_t key_sym, uint32_t key_code) {
96 } 96 }
97 // Check if key exists 97 // Check if key exists
98 if (!check_key(key_sym, key_code)) { 98 if (!check_key(key_sym, key_code)) {
99 // Check that we dont exceed buffer length 99 // Check that we don't exceed buffer length
100 int insert = find_key(0, 0, true); 100 int insert = find_key(0, 0, true);
101 if (insert < KEY_STATE_MAX_LENGTH) { 101 if (insert < KEY_STATE_MAX_LENGTH) {
102 key_state_array[insert].key_sym = key_sym; 102 key_state_array[insert].key_sym = key_sym;
@@ -249,7 +249,7 @@ static void pointer_mode_set_dragging(void) {
249 pointer_state.mode = M_DRAGGING | M_FLOATING; 249 pointer_state.mode = M_DRAGGING | M_FLOATING;
250 } else { 250 } else {
251 pointer_state.mode = M_DRAGGING | M_TILING; 251 pointer_state.mode = M_DRAGGING | M_TILING;
252 // unset mode if we cant drag tile 252 // unset mode if we can't drag tile
253 if (initial.ptr->parent->type == C_WORKSPACE && 253 if (initial.ptr->parent->type == C_WORKSPACE &&
254 initial.ptr->parent->children->length == 1) { 254 initial.ptr->parent->children->length == 1) {
255 pointer_state.mode = 0; 255 pointer_state.mode = 0;
@@ -317,7 +317,7 @@ void pointer_mode_set(uint32_t button, bool condition) {
317 switch (button) { 317 switch (button) {
318 // Start left-click mode 318 // Start left-click mode
319 case M_LEFT_CLICK: 319 case M_LEFT_CLICK:
320 // if button release dont do anything 320 // if button release don't do anything
321 if (pointer_state.left.held) { 321 if (pointer_state.left.held) {
322 if (config->dragging_key == M_LEFT_CLICK) { 322 if (config->dragging_key == M_LEFT_CLICK) {
323 pointer_mode_set_dragging(); 323 pointer_mode_set_dragging();
@@ -329,7 +329,7 @@ void pointer_mode_set(uint32_t button, bool condition) {
329 329
330 // Start right-click mode 330 // Start right-click mode
331 case M_RIGHT_CLICK: 331 case M_RIGHT_CLICK:
332 // if button release dont do anyhting 332 // if button release don't do anyhting
333 if (pointer_state.right.held) { 333 if (pointer_state.right.held) {
334 if (config->dragging_key == M_RIGHT_CLICK) { 334 if (config->dragging_key == M_RIGHT_CLICK) {
335 pointer_mode_set_dragging(); 335 pointer_mode_set_dragging();
diff --git a/sway/layout.c b/sway/layout.c
index 180aafa0..b1139b1b 100644
--- a/sway/layout.c
+++ b/sway/layout.c
@@ -204,7 +204,7 @@ void swap_container(swayc_t *a, swayc_t *b) {
204 if (a_parent->focused == a) { 204 if (a_parent->focused == a) {
205 a_parent->focused = b; 205 a_parent->focused = b;
206 } 206 }
207 // dont want to double switch 207 // don't want to double switch
208 if (b_parent->focused == b && a_parent != b_parent) { 208 if (b_parent->focused == b && a_parent != b_parent) {
209 b_parent->focused = a; 209 b_parent->focused = a;
210 } 210 }