aboutsummaryrefslogtreecommitdiff
path: root/rootston/wl_shell.c
diff options
context:
space:
mode:
authorTony Crisci <tony@dubstepdish.com>2017-10-21 09:37:58 -0400
committerTony Crisci <tony@dubstepdish.com>2017-10-21 09:37:58 -0400
commita87b60e31e5288c1c3e8c8f94c9a7ccb29e38b54 (patch)
treee9d1daaa8fc5a2ee1103ec19855b958f47932145 /rootston/wl_shell.c
parent39308cb8688560607cb1d024123d32a7905c6369 (diff)
parent1782d5e7b7dc5e494cfee72b758d5fa8114aecc8 (diff)
Merge branch 'master' into feature/data-device-selection
Diffstat (limited to 'rootston/wl_shell.c')
-rw-r--r--rootston/wl_shell.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/rootston/wl_shell.c b/rootston/wl_shell.c
index 33f54a32..2c6047b1 100644
--- a/rootston/wl_shell.c
+++ b/rootston/wl_shell.c
@@ -109,19 +109,6 @@ void handle_wl_shell_surface(struct wl_listener *listener, void *data) {
struct roots_view *view = calloc(1, sizeof(struct roots_view));
view->type = ROOTS_WL_SHELL_VIEW;
- if (surface->state == WLR_WL_SHELL_SURFACE_STATE_TRANSIENT) {
- // we need to map it relative to the parent
- int i =
- list_seq_find(desktop->views,
- shell_surface_compare_equals, surface->parent);
- if (i != -1) {
- struct roots_view *parent = desktop->views->items[i];
- view->x = parent->x + surface->transient_state->x;
- view->y = parent->y + surface->transient_state->y;
- }
- } else {
- view->x = view->y = 200;
- }
view->wl_shell_surface = surface;
view->roots_wl_shell_surface = roots_surface;
view->wlr_surface = surface->surface;
@@ -131,4 +118,17 @@ void handle_wl_shell_surface(struct wl_listener *listener, void *data) {
roots_surface->view = view;
list_add(desktop->views, view);
view_initialize(view);
+
+ if (surface->state == WLR_WL_SHELL_SURFACE_STATE_TRANSIENT) {
+ // we need to map it relative to the parent
+ int i =
+ list_seq_find(desktop->views,
+ shell_surface_compare_equals, surface->parent);
+ if (i != -1) {
+ struct roots_view *parent = desktop->views->items[i];
+ view_set_position(view,
+ parent->x + surface->transient_state->x,
+ parent->y + surface->transient_state->y);
+ }
+ }
}