From 14b7755134373d61f104a2e5c8ebaa3952b83e46 Mon Sep 17 00:00:00 2001 From: taiyu Date: Sat, 15 Aug 2015 17:43:45 -0700 Subject: set maximize flag for handled views --- sway/handlers.c | 4 ++++ 1 file changed, 4 insertions(+) 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) { } static bool handle_view_created(wlc_handle handle) { + swayc_t *focused = get_focused_container(&root_container); swayc_t *view = new_view(focused, handle); if (view) { + //Set maximize flag for windows. + //TODO: floating windows have this unset + wlc_view_set_state(handle, WLC_BIT_MAXIMIZED, true); unfocus_all(&root_container); focus_view(view); arrange_windows(view->parent, -1, -1); -- cgit v1.2.3-54-g00ecf From 2e92538d7febe73fb1bebd736cf5515bb4783d03 Mon Sep 17 00:00:00 2001 From: taiyu Date: Sat, 15 Aug 2015 17:45:16 -0700 Subject: style --- sway/handlers.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sway/handlers.c b/sway/handlers.c index bb6c9843..9944be33 100644 --- a/sway/handlers.c +++ b/sway/handlers.c @@ -86,7 +86,6 @@ static void handle_output_focused(wlc_handle output, bool focus) { } static bool handle_view_created(wlc_handle handle) { - swayc_t *focused = get_focused_container(&root_container); swayc_t *view = new_view(focused, handle); if (view) { -- cgit v1.2.3-54-g00ecf