diff options
-rw-r--r-- | sway/focus.c | 2 | ||||
-rw-r--r-- | sway/handlers.c | 11 | ||||
-rw-r--r-- | sway/workspace.c | 1 |
3 files changed, 11 insertions, 3 deletions
diff --git a/sway/focus.c b/sway/focus.c index 7023d37d..f76b2d9a 100644 --- a/sway/focus.c +++ b/sway/focus.c | |||
@@ -20,6 +20,8 @@ static void update_focus(swayc_t *c) { | |||
20 | // Case where output changes | 20 | // Case where output changes |
21 | case C_OUTPUT: | 21 | case C_OUTPUT: |
22 | wlc_output_focus(c->handle); | 22 | wlc_output_focus(c->handle); |
23 | //Set new workspace to the outputs focused workspace | ||
24 | active_workspace = c->focused; | ||
23 | break; | 25 | break; |
24 | 26 | ||
25 | // Case where workspace changes | 27 | // Case where workspace changes |
diff --git a/sway/handlers.c b/sway/handlers.c index 344edd07..24189003 100644 --- a/sway/handlers.c +++ b/sway/handlers.c | |||
@@ -179,8 +179,14 @@ static bool handle_view_created(wlc_handle handle) { | |||
179 | if (!focused || focused->type == C_OUTPUT) { | 179 | if (!focused || focused->type == C_OUTPUT) { |
180 | focused = get_focused_container(&root_container); | 180 | focused = get_focused_container(&root_container); |
181 | } | 181 | } |
182 | sway_log(L_DEBUG, "creating view %ld with type %x, state %x, with parent %ld", | 182 | sway_log(L_DEBUG, "handle:%ld type:%x state:%x parent:%ld " |
183 | handle, wlc_view_get_type(handle), wlc_view_get_state(handle), parent); | 183 | "mask:%d (x:%d y:%d w:%d h:%d) title:%s " |
184 | "class:%s appid:%s", | ||
185 | handle, wlc_view_get_type(handle), wlc_view_get_state(handle), parent, | ||
186 | wlc_view_get_mask(handle), wlc_view_get_geometry(handle)->origin.x, | ||
187 | wlc_view_get_geometry(handle)->origin.y,wlc_view_get_geometry(handle)->size.w, | ||
188 | wlc_view_get_geometry(handle)->size.h, wlc_view_get_title(handle), | ||
189 | wlc_view_get_class(handle), wlc_view_get_app_id(handle)); | ||
184 | 190 | ||
185 | // TODO properly figure out how each window should be handled. | 191 | // TODO properly figure out how each window should be handled. |
186 | switch (wlc_view_get_type(handle)) { | 192 | switch (wlc_view_get_type(handle)) { |
@@ -319,6 +325,7 @@ static bool handle_key(wlc_handle view, uint32_t time, const struct wlc_modifier | |||
319 | sway_log(L_DEBUG, "modifier %x: state %d: key %d, sym: %d", | 325 | sway_log(L_DEBUG, "modifier %x: state %d: key %d, sym: %d", |
320 | modifiers->mods, state, key, sym); | 326 | modifiers->mods, state, key, sym); |
321 | 327 | ||
328 | //Revert floating container back to original position on keypress | ||
322 | if (state == WLC_KEY_STATE_PRESSED && (dragging || resizing)) { | 329 | if (state == WLC_KEY_STATE_PRESSED && (dragging || resizing)) { |
323 | reset_floating(get_focused_view(&root_container)); | 330 | reset_floating(get_focused_view(&root_container)); |
324 | } | 331 | } |
diff --git a/sway/workspace.c b/sway/workspace.c index a690e3ae..ec60c8e0 100644 --- a/sway/workspace.c +++ b/sway/workspace.c | |||
@@ -183,7 +183,6 @@ void workspace_switch(swayc_t *workspace) { | |||
183 | return; | 183 | return; |
184 | } | 184 | } |
185 | sway_log(L_DEBUG, "Switching to workspace %p:%s", workspace, workspace->name); | 185 | sway_log(L_DEBUG, "Switching to workspace %p:%s", workspace, workspace->name); |
186 | active_workspace = workspace; | ||
187 | set_focused_container(get_focused_view(workspace)); | 186 | set_focused_container(get_focused_view(workspace)); |
188 | arrange_windows(workspace, -1, -1); | 187 | arrange_windows(workspace, -1, -1); |
189 | } | 188 | } |