diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-01-30 23:09:21 -0500 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2018-01-30 23:09:21 -0500 |
commit | b28602aa7425cf435150e6008624429737e037d3 (patch) | |
tree | dafe7d23c48457299f33803832f6b89e09a915ce /sway/desktop | |
parent | Remove include/sway/old/ (diff) | |
download | sway-b28602aa7425cf435150e6008624429737e037d3.tar.gz sway-b28602aa7425cf435150e6008624429737e037d3.tar.zst sway-b28602aa7425cf435150e6008624429737e037d3.zip |
Implement workspaces
Diffstat (limited to 'sway/desktop')
-rw-r--r-- | sway/desktop/output.c | 4 | ||||
-rw-r--r-- | sway/desktop/xdg_shell_v6.c | 9 |
2 files changed, 4 insertions, 9 deletions
diff --git a/sway/desktop/output.c b/sway/desktop/output.c index 0f00222b..a650665f 100644 --- a/sway/desktop/output.c +++ b/sway/desktop/output.c | |||
@@ -219,8 +219,8 @@ static void output_frame_notify(struct wl_listener *listener, void *data) { | |||
219 | wlr_output_make_current(wlr_output); | 219 | wlr_output_make_current(wlr_output); |
220 | wlr_renderer_begin(server->renderer, wlr_output); | 220 | wlr_renderer_begin(server->renderer, wlr_output); |
221 | 221 | ||
222 | swayc_descendants_of_type( | 222 | swayc_t *workspace = soutput->swayc->focused; |
223 | &root_container, C_VIEW, output_frame_view, soutput); | 223 | swayc_descendants_of_type(workspace, C_VIEW, output_frame_view, soutput); |
224 | 224 | ||
225 | // render unmanaged views on top | 225 | // render unmanaged views on top |
226 | struct sway_view *view; | 226 | struct sway_view *view; |
diff --git a/sway/desktop/xdg_shell_v6.c b/sway/desktop/xdg_shell_v6.c index 4b50093f..ca56a9c0 100644 --- a/sway/desktop/xdg_shell_v6.c +++ b/sway/desktop/xdg_shell_v6.c | |||
@@ -124,8 +124,6 @@ void handle_xdg_shell_v6_surface(struct wl_listener *listener, void *data) { | |||
124 | sway_surface->view = sway_view; | 124 | sway_surface->view = sway_view; |
125 | 125 | ||
126 | // TODO: | 126 | // TODO: |
127 | // - Wire up listeners | ||
128 | // - Handle popups | ||
129 | // - Look up pid and open on appropriate workspace | 127 | // - Look up pid and open on appropriate workspace |
130 | // - Set new view to maximized so it behaves nicely | 128 | // - Set new view to maximized so it behaves nicely |
131 | // - Criteria | 129 | // - Criteria |
@@ -136,11 +134,8 @@ void handle_xdg_shell_v6_surface(struct wl_listener *listener, void *data) { | |||
136 | sway_surface->destroy.notify = handle_destroy; | 134 | sway_surface->destroy.notify = handle_destroy; |
137 | wl_signal_add(&xdg_surface->events.destroy, &sway_surface->destroy); | 135 | wl_signal_add(&xdg_surface->events.destroy, &sway_surface->destroy); |
138 | 136 | ||
139 | // TODO: actual focus semantics | 137 | struct sway_seat *seat = input_manager_current_seat(input_manager); |
140 | swayc_t *parent = root_container.children->items[0]; | 138 | swayc_t *cont = new_view(seat->focus, sway_view); |
141 | parent = parent->children->items[0]; // workspace | ||
142 | |||
143 | swayc_t *cont = new_view(parent, sway_view); | ||
144 | sway_view->swayc = cont; | 139 | sway_view->swayc = cont; |
145 | 140 | ||
146 | arrange_windows(cont->parent, -1, -1); | 141 | arrange_windows(cont->parent, -1, -1); |