aboutsummaryrefslogtreecommitdiff
path: root/sway/desktop/xdg_shell_v6.c
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2017-11-22 21:06:08 -0500
committerDrew DeVault <sir@cmpwn.com>2017-11-22 21:06:08 -0500
commit4ca1e77fdbbf559a5bb28d4936afa6ade63985cd (patch)
tree935c9a56d20f591688d196a85cecfc6080727d26 /sway/desktop/xdg_shell_v6.c
parentaeda2e077f6184ecd26dc078c7b5db7f0dc54fd7 (diff)
Add views to tree and render them
Diffstat (limited to 'sway/desktop/xdg_shell_v6.c')
-rw-r--r--sway/desktop/xdg_shell_v6.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/sway/desktop/xdg_shell_v6.c b/sway/desktop/xdg_shell_v6.c
index b3dbcfbe..e2a61ebf 100644
--- a/sway/desktop/xdg_shell_v6.c
+++ b/sway/desktop/xdg_shell_v6.c
@@ -2,6 +2,7 @@
#include <stdlib.h>
#include <wayland-server.h>
#include <wlr/types/wlr_xdg_shell_v6.h>
+#include "sway/container.h"
#include "sway/server.h"
#include "sway/view.h"
#include "log.h"
@@ -47,6 +48,9 @@ void handle_xdg_shell_v6_surface(struct wl_listener *listener, void *data) {
}
sway_view->type = SWAY_XDG_SHELL_V6_VIEW;
sway_view->iface.get_prop = get_prop;
+ sway_view->wlr_xdg_surface_v6 = xdg_surface;
+ sway_view->sway_xdg_surface_v6 = sway_surface;
+ sway_view->surface = xdg_surface->surface;
sway_surface->view = sway_view;
// TODO:
@@ -56,4 +60,11 @@ void handle_xdg_shell_v6_surface(struct wl_listener *listener, void *data) {
// - Look up pid and open on appropriate workspace
// - Set new view to maximized so it behaves nicely
// - Criteria
+
+ // 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);
+ sway_view->swayc = cont;
}