summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sway/handlers.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sway/handlers.c b/sway/handlers.c
index 98d4831f..bb6c9843 100644
--- a/sway/handlers.c
+++ b/sway/handlers.c
@@ -86,9 +86,13 @@ static void handle_output_focused(wlc_handle output, bool focus) {
86} 86}
87 87
88static bool handle_view_created(wlc_handle handle) { 88static bool handle_view_created(wlc_handle handle) {
89
89 swayc_t *focused = get_focused_container(&root_container); 90 swayc_t *focused = get_focused_container(&root_container);
90 swayc_t *view = new_view(focused, handle); 91 swayc_t *view = new_view(focused, handle);
91 if (view) { 92 if (view) {
93 //Set maximize flag for windows.
94 //TODO: floating windows have this unset
95 wlc_view_set_state(handle, WLC_BIT_MAXIMIZED, true);
92 unfocus_all(&root_container); 96 unfocus_all(&root_container);
93 focus_view(view); 97 focus_view(view);
94 arrange_windows(view->parent, -1, -1); 98 arrange_windows(view->parent, -1, -1);