aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2016-10-08 09:45:21 -0400
committerLibravatar Drew DeVault <sir@cmpwn.com>2016-10-12 21:43:28 -0400
commit0af3196d0ee3fe37ce4e88808979a80cfde2ea1b (patch)
treee804562b07a46aee52d447fd04892c83b90dd52a
parentMerge pull request #941 from thejan2009/floating-border (diff)
downloadsway-0af3196d0ee3fe37ce4e88808979a80cfde2ea1b.tar.gz
sway-0af3196d0ee3fe37ce4e88808979a80cfde2ea1b.tar.zst
sway-0af3196d0ee3fe37ce4e88808979a80cfde2ea1b.zip
Merge pull request #942 from thejan2009/bugfix-931
fix for_window [] move scratchpad
-rw-r--r--sway/handlers.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sway/handlers.c b/sway/handlers.c
index 1afdcbbb..9643a255 100644
--- a/sway/handlers.c
+++ b/sway/handlers.c
@@ -376,6 +376,7 @@ static bool handle_view_created(wlc_handle handle) {
376 if (newview) { 376 if (newview) {
377 ipc_event_window(newview, "new"); 377 ipc_event_window(newview, "new");
378 set_focused_container(newview); 378 set_focused_container(newview);
379 wlc_view_set_mask(handle, VISIBLE);
379 swayc_t *output = swayc_parent_by_type(newview, C_OUTPUT); 380 swayc_t *output = swayc_parent_by_type(newview, C_OUTPUT);
380 arrange_windows(output, -1, -1); 381 arrange_windows(output, -1, -1);
381 // check if it matches for_window in config and execute if so 382 // check if it matches for_window in config and execute if so
@@ -401,8 +402,9 @@ static bool handle_view_created(wlc_handle handle) {
401 // if parent container is a workspace, newview its only child and 402 // if parent container is a workspace, newview its only child and
402 // layout is tabbed/stacked, add a container around newview 403 // layout is tabbed/stacked, add a container around newview
403 swayc_t *parent_container = newview->parent; 404 swayc_t *parent_container = newview->parent;
404 if (parent_container->type == C_WORKSPACE && parent_container->children->length == 1 && 405 if (parent_container && parent_container->type == C_WORKSPACE &&
405 (parent_container->layout == L_TABBED || parent_container->layout == L_STACKED)) { 406 parent_container->children && parent_container->children->length == 1 &&
407 (parent_container->layout == L_TABBED || parent_container->layout == L_STACKED)) {
406 swayc_t *container = new_container(newview, parent_container->layout); 408 swayc_t *container = new_container(newview, parent_container->layout);
407 set_focused_container(newview); 409 set_focused_container(newview);
408 arrange_windows(container, -1, -1); 410 arrange_windows(container, -1, -1);
@@ -413,8 +415,8 @@ static bool handle_view_created(wlc_handle handle) {
413 *h = handle; 415 *h = handle;
414 sway_log(L_DEBUG, "Adding unmanaged window %p to %p", h, output->unmanaged); 416 sway_log(L_DEBUG, "Adding unmanaged window %p to %p", h, output->unmanaged);
415 list_add(output->unmanaged, h); 417 list_add(output->unmanaged, h);
418 wlc_view_set_mask(handle, VISIBLE);
416 } 419 }
417 wlc_view_set_mask(handle, VISIBLE);
418 420
419 if (return_to_workspace && current_ws != swayc_active_workspace()) { 421 if (return_to_workspace && current_ws != swayc_active_workspace()) {
420 // we were on one workspace, switched to another to add this view, 422 // we were on one workspace, switched to another to add this view,