diff options
author | Drew DeVault <sir@cmpwn.com> | 2016-06-30 08:30:03 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2016-06-30 08:30:03 -0400 |
commit | 7144fb9fc3b3d3b45d23deaab6a10caf3216cca4 (patch) | |
tree | f24f60afd5ee641bddc78e6b16a8035e3abf7469 | |
parent | Merge pull request #728 from deklov/master (diff) | |
download | sway-7144fb9fc3b3d3b45d23deaab6a10caf3216cca4.tar.gz sway-7144fb9fc3b3d3b45d23deaab6a10caf3216cca4.tar.zst sway-7144fb9fc3b3d3b45d23deaab6a10caf3216cca4.zip |
Spawn windows as floating if they have a parent
Fixes #604
-rw-r--r-- | sway/handlers.c | 8 |
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) { | |||
235 | switch (wlc_view_get_type(handle)) { | 235 | switch (wlc_view_get_type(handle)) { |
236 | // regular view created regularly | 236 | // regular view created regularly |
237 | case 0: | 237 | case 0: |
238 | newview = new_view(focused, handle); | 238 | if (parent) { |
239 | wlc_view_set_state(handle, WLC_BIT_MAXIMIZED, true); | 239 | newview = new_floating_view(handle); |
240 | } else { | ||
241 | newview = new_view(focused, handle); | ||
242 | wlc_view_set_state(handle, WLC_BIT_MAXIMIZED, true); | ||
243 | } | ||
240 | break; | 244 | break; |
241 | 245 | ||
242 | // Dmenu keeps viewfocus, but others with this flag don't, for now simulate | 246 | // Dmenu keeps viewfocus, but others with this flag don't, for now simulate |