diff options
author | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-04-17 09:31:34 +1000 |
---|---|---|
committer | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-04-17 09:31:34 +1000 |
commit | c685ef081f090d1e15428f55426e02f2274312d0 (patch) | |
tree | e4997c84099e962a0c00a8fea22be30964cecda3 /sway/tree/view.c | |
parent | Feedback for fullscreen. (diff) | |
download | sway-c685ef081f090d1e15428f55426e02f2274312d0.tar.gz sway-c685ef081f090d1e15428f55426e02f2274312d0.tar.zst sway-c685ef081f090d1e15428f55426e02f2274312d0.zip |
Create sway_workspace struct.
Diffstat (limited to 'sway/tree/view.c')
-rw-r--r-- | sway/tree/view.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sway/tree/view.c b/sway/tree/view.c index 10285ad0..e7a267ec 100644 --- a/sway/tree/view.c +++ b/sway/tree/view.c | |||
@@ -7,6 +7,7 @@ | |||
7 | #include "sway/tree/container.h" | 7 | #include "sway/tree/container.h" |
8 | #include "sway/tree/layout.h" | 8 | #include "sway/tree/layout.h" |
9 | #include "sway/tree/view.h" | 9 | #include "sway/tree/view.h" |
10 | #include "sway/tree/workspace.h" | ||
10 | 11 | ||
11 | void view_init(struct sway_view *view, enum sway_view_type type, | 12 | void view_init(struct sway_view *view, enum sway_view_type type, |
12 | const struct sway_view_impl *impl) { | 13 | const struct sway_view_impl *impl) { |
@@ -90,10 +91,10 @@ void view_set_fullscreen(struct sway_view *view, bool fullscreen) { | |||
90 | view->is_fullscreen = fullscreen; | 91 | view->is_fullscreen = fullscreen; |
91 | 92 | ||
92 | if (fullscreen) { | 93 | if (fullscreen) { |
93 | workspace->fullscreen = view; | 94 | workspace->sway_workspace->fullscreen = view; |
94 | view_configure(view, 0, 0, output->wlr_output->width, output->wlr_output->height); | 95 | view_configure(view, 0, 0, output->wlr_output->width, output->wlr_output->height); |
95 | } else { | 96 | } else { |
96 | workspace->fullscreen = NULL; | 97 | workspace->sway_workspace->fullscreen = NULL; |
97 | arrange_windows(workspace, -1, -1); | 98 | arrange_windows(workspace, -1, -1); |
98 | } | 99 | } |
99 | 100 | ||
@@ -105,7 +106,7 @@ void view_set_fullscreen(struct sway_view *view, bool fullscreen) { | |||
105 | void view_close(struct sway_view *view) { | 106 | void view_close(struct sway_view *view) { |
106 | if (view->is_fullscreen) { | 107 | if (view->is_fullscreen) { |
107 | struct sway_container *ws = container_parent(view->swayc, C_WORKSPACE); | 108 | struct sway_container *ws = container_parent(view->swayc, C_WORKSPACE); |
108 | ws->fullscreen = NULL; | 109 | ws->sway_workspace->fullscreen = NULL; |
109 | } | 110 | } |
110 | 111 | ||
111 | if (view->impl->close) { | 112 | if (view->impl->close) { |