aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFurkan Sahin <furkan-dev@proton.me>2016-06-30 08:30:03 -0400
committerFurkan Sahin <furkan-dev@proton.me>2016-06-30 08:30:03 -0400
commiteeb5c794779e896ef999b9daa350358e7a0f97db (patch)
treef24f60afd5ee641bddc78e6b16a8035e3abf7469
parent033b82b11b19388838cbe00813542d95e7cd79c2 (diff)
Spawn windows as floating if they have a parent
Fixes #604
-rw-r--r--sway/handlers.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sway/handlers.c b/sway/handlers.c
index c5aee4aa..53dbeb87 100644
--- a/sway/handlers.c
+++ b/sway/handlers.c
@@ -235,8 +235,12 @@ static bool handle_view_created(wlc_handle handle) {
switch (wlc_view_get_type(handle)) {
// regular view created regularly
case 0:
- newview = new_view(focused, handle);
- wlc_view_set_state(handle, WLC_BIT_MAXIMIZED, true);
+ if (parent) {
+ newview = new_floating_view(handle);
+ } else {
+ newview = new_view(focused, handle);
+ wlc_view_set_state(handle, WLC_BIT_MAXIMIZED, true);
+ }
break;
// Dmenu keeps viewfocus, but others with this flag don't, for now simulate