aboutsummaryrefslogtreecommitdiff
path: root/rootston
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2017-09-27 14:48:53 +0200
committeremersion <contact@emersion.fr>2017-09-27 14:48:53 +0200
commitacf58e04de5652ed13ec46458a39a4dd97ba3b78 (patch)
tree8235e75540ab66ea3fb2f42b0f12f2036b169407 /rootston
parented9a43c2134f19ddaa4d8e7c9f680d8a3d8329a6 (diff)
Fix segfault, add wl_shell view
Diffstat (limited to 'rootston')
-rw-r--r--rootston/meson.build2
-rw-r--r--rootston/wl_shell.c18
2 files changed, 18 insertions, 2 deletions
diff --git a/rootston/meson.build b/rootston/meson.build
index de2d04de..6e9e0041 100644
--- a/rootston/meson.build
+++ b/rootston/meson.build
@@ -10,6 +10,6 @@ executable(
'output.c',
'pointer.c',
'xdg_shell_v6.c',
- 'wl_shell.c'
+ 'wl_shell.c',
], dependencies: wlroots
)
diff --git a/rootston/wl_shell.c b/rootston/wl_shell.c
index 0dcc0565..0929a999 100644
--- a/rootston/wl_shell.c
+++ b/rootston/wl_shell.c
@@ -16,5 +16,21 @@ void handle_wl_shell_surface(struct wl_listener *listener, void *data) {
struct wlr_wl_shell_surface *surface = data;
wlr_log(L_DEBUG, "new wl_shell surface");
- wlr_wl_shell_surface_ping(surface);
+ //wlr_wl_shell_surface_ping(surface);
+
+ struct roots_wl_shell_surface *roots_surface =
+ calloc(1, sizeof(struct roots_wl_shell_surface));
+ // TODO: all of the trimmings
+
+ struct roots_view *view = calloc(1, sizeof(struct roots_view));
+ view->type = ROOTS_WL_SHELL_VIEW;
+ view->x = view->y = 200;
+ view->wl_shell_surface = surface;
+ view->roots_wl_shell_surface = roots_surface;
+ //view->wlr_surface = surface->surface;
+ //view->get_input_bounds = get_input_bounds;
+ //view->activate = activate;
+ view->desktop = desktop;
+ roots_surface->view = view;
+ wl_list_insert(&desktop->views, &view->link);
}