aboutsummaryrefslogtreecommitdiff
path: root/sway/desktop/xdg_shell_v6.c
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-01-30 23:09:21 -0500
committerDrew DeVault <sir@cmpwn.com>2018-01-30 23:09:21 -0500
commitb28602aa7425cf435150e6008624429737e037d3 (patch)
treedafe7d23c48457299f33803832f6b89e09a915ce /sway/desktop/xdg_shell_v6.c
parent8231f99c12b059bf762c2ca77258a520b3a6886f (diff)
Implement workspaces
Diffstat (limited to 'sway/desktop/xdg_shell_v6.c')
-rw-r--r--sway/desktop/xdg_shell_v6.c9
1 files changed, 2 insertions, 7 deletions
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) {
sway_surface->view = sway_view;
// TODO:
- // - Wire up listeners
- // - Handle popups
// - Look up pid and open on appropriate workspace
// - Set new view to maximized so it behaves nicely
// - Criteria
@@ -136,11 +134,8 @@ void handle_xdg_shell_v6_surface(struct wl_listener *listener, void *data) {
sway_surface->destroy.notify = handle_destroy;
wl_signal_add(&xdg_surface->events.destroy, &sway_surface->destroy);
- // TODO: actual focus semantics
- swayc_t *parent = root_container.children->items[0];
- parent = parent->children->items[0]; // workspace
-
- swayc_t *cont = new_view(parent, sway_view);
+ struct sway_seat *seat = input_manager_current_seat(input_manager);
+ swayc_t *cont = new_view(seat->focus, sway_view);
sway_view->swayc = cont;
arrange_windows(cont->parent, -1, -1);