summaryrefslogtreecommitdiffstats
path: root/sway/handlers.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/handlers.c')
-rw-r--r--sway/handlers.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/sway/handlers.c b/sway/handlers.c
index 03a32835..2f062911 100644
--- a/sway/handlers.c
+++ b/sway/handlers.c
@@ -87,7 +87,7 @@ swayc_t *container_under_pointer(void) {
87static bool handle_output_created(wlc_handle output) { 87static bool handle_output_created(wlc_handle output) {
88 swayc_t *op = new_output(output); 88 swayc_t *op = new_output(output);
89 89
90 //Switch to workspace if we need to 90 // Switch to workspace if we need to
91 if (active_workspace == NULL) { 91 if (active_workspace == NULL) {
92 swayc_t *ws = op->children->items[0]; 92 swayc_t *ws = op->children->items[0];
93 workspace_switch(ws); 93 workspace_switch(ws);
@@ -109,7 +109,7 @@ static void handle_output_destroyed(wlc_handle output) {
109 if (list->length == 0) { 109 if (list->length == 0) {
110 active_workspace = NULL; 110 active_workspace = NULL;
111 } else { 111 } else {
112 //switch to other outputs active workspace 112 // switch to other outputs active workspace
113 workspace_switch(((swayc_t *)root_container.children->items[0])->focused); 113 workspace_switch(((swayc_t *)root_container.children->items[0])->focused);
114 } 114 }
115} 115}
@@ -167,7 +167,7 @@ static bool handle_view_created(wlc_handle handle) {
167 // Dmenu keeps viewfocus, but others with this flag dont, for now simulate 167 // Dmenu keeps viewfocus, but others with this flag dont, for now simulate
168 // dmenu 168 // dmenu
169 case WLC_BIT_OVERRIDE_REDIRECT: 169 case WLC_BIT_OVERRIDE_REDIRECT:
170// locked_view_focus = true; 170// locked_view_focus = true;
171 wlc_view_focus(handle); 171 wlc_view_focus(handle);
172 wlc_view_set_state(handle, WLC_BIT_ACTIVATED, true); 172 wlc_view_set_state(handle, WLC_BIT_ACTIVATED, true);
173 wlc_view_bring_to_front(handle); 173 wlc_view_bring_to_front(handle);
@@ -217,7 +217,7 @@ static void handle_view_destroyed(wlc_handle handle) {
217 // DMENU has this flag, and takes view_focus, but other things with this 217 // DMENU has this flag, and takes view_focus, but other things with this
218 // flag dont 218 // flag dont
219 case WLC_BIT_OVERRIDE_REDIRECT: 219 case WLC_BIT_OVERRIDE_REDIRECT:
220// locked_view_focus = false; 220// locked_view_focus = false;
221 break; 221 break;
222 case WLC_BIT_OVERRIDE_REDIRECT|WLC_BIT_UNMANAGED: 222 case WLC_BIT_OVERRIDE_REDIRECT|WLC_BIT_UNMANAGED:
223 locked_container_focus = false; 223 locked_container_focus = false;
@@ -444,7 +444,7 @@ static bool handle_pointer_motion(wlc_handle handle, uint32_t time, const struct
444 } 444 }
445 } 445 }
446 if (config->focus_follows_mouse && prev_handle != handle) { 446 if (config->focus_follows_mouse && prev_handle != handle) {
447 //Dont change focus if fullscreen 447 // Dont change focus if fullscreen
448 swayc_t *focused = get_focused_view(view); 448 swayc_t *focused = get_focused_view(view);
449 if (!(focused->type == C_VIEW && wlc_view_get_state(focused->handle) & WLC_BIT_FULLSCREEN) 449 if (!(focused->type == C_VIEW && wlc_view_get_state(focused->handle) & WLC_BIT_FULLSCREEN)
450 && !(pointer_state.l_held || pointer_state.r_held)) { 450 && !(pointer_state.l_held || pointer_state.r_held)) {
@@ -474,7 +474,7 @@ static bool handle_pointer_motion(wlc_handle handle, uint32_t time, const struct
474static bool handle_pointer_button(wlc_handle view, uint32_t time, const struct wlc_modifiers *modifiers, 474static bool handle_pointer_button(wlc_handle view, uint32_t time, const struct wlc_modifiers *modifiers,
475 uint32_t button, enum wlc_button_state state, const struct wlc_origin *origin) { 475 uint32_t button, enum wlc_button_state state, const struct wlc_origin *origin) {
476 swayc_t *focused = get_focused_container(&root_container); 476 swayc_t *focused = get_focused_container(&root_container);
477 //dont change focus if fullscreen 477 // dont change focus if fullscreen
478 if (focused->type == C_VIEW && wlc_view_get_state(focused->handle) & WLC_BIT_FULLSCREEN) { 478 if (focused->type == C_VIEW && wlc_view_get_state(focused->handle) & WLC_BIT_FULLSCREEN) {
479 return false; 479 return false;
480 } 480 }
@@ -510,7 +510,7 @@ static bool handle_pointer_button(wlc_handle view, uint32_t time, const struct w
510 pointer_state.lock.left = !pointer_state.lock.right; 510 pointer_state.lock.left = !pointer_state.lock.right;
511 start_floating(pointer); 511 start_floating(pointer);
512 } 512 }
513 //Dont want pointer sent to window while dragging or resizing 513 // Dont want pointer sent to window while dragging or resizing
514 return (pointer_state.floating.drag || pointer_state.floating.resize); 514 return (pointer_state.floating.drag || pointer_state.floating.resize);
515 } 515 }
516 return (pointer && pointer != focused); 516 return (pointer && pointer != focused);