aboutsummaryrefslogtreecommitdiff
path: root/rootston
diff options
context:
space:
mode:
authorTony Crisci <tony@dubstepdish.com>2018-01-23 07:11:54 -0500
committerTony Crisci <tony@dubstepdish.com>2018-01-23 08:07:03 -0500
commitfc627afd1842a8288cec620daa729c170be2af17 (patch)
tree49912024c7c1ffd869bd7d18c7d2937683247392 /rootston
parent9d87d4e33616aba3f57578548fdb8cb150b814e8 (diff)
fix decorations on wayland backend
Diffstat (limited to 'rootston')
-rw-r--r--rootston/cursor.c4
-rw-r--r--rootston/desktop.c3
-rw-r--r--rootston/seat.c4
3 files changed, 8 insertions, 3 deletions
diff --git a/rootston/cursor.c b/rootston/cursor.c
index 5430afe5..d8753f44 100644
--- a/rootston/cursor.c
+++ b/rootston/cursor.c
@@ -115,7 +115,7 @@ static void roots_cursor_update_position(struct roots_cursor *cursor,
seat_view_deco_leave(cursor->pointer_view);
cursor->pointer_view = NULL;
}
- bool set_compositor_cursor = !view && cursor->cursor_client;
+ bool set_compositor_cursor = !view && !surface && cursor->cursor_client;
if (view && surface) {
struct wl_client *view_client =
wl_resource_get_client(view->wlr_surface->resource);
@@ -211,7 +211,7 @@ static void roots_cursor_press_button(struct roots_cursor *cursor,
struct roots_desktop *desktop = seat->input->server->desktop;
bool is_touch = device->type == WLR_INPUT_DEVICE_TOUCH;
- struct wlr_surface *surface;
+ struct wlr_surface *surface = NULL;
double sx, sy;
struct roots_view *view =
desktop_view_at(desktop, lx, ly, &surface, &sx, &sy);
diff --git a/rootston/desktop.c b/rootston/desktop.c
index 5fa27db2..70dafec4 100644
--- a/rootston/desktop.c
+++ b/rootston/desktop.c
@@ -400,7 +400,8 @@ static bool view_at(struct roots_view *view, double lx, double ly,
if (view_get_deco_part(view, view_sx, view_sy)) {
*sx = view_sx;
*sy = view_sy;
- return view;
+ *surface = NULL;
+ return true;
}
if (wlr_box_contains_point(&box, view_sx, view_sy) &&
diff --git a/rootston/seat.c b/rootston/seat.c
index 41ae6c9f..e6e505b5 100644
--- a/rootston/seat.c
+++ b/rootston/seat.c
@@ -573,6 +573,10 @@ static void seat_view_destroy(struct roots_seat_view *seat_view) {
seat->cursor->mode = ROOTS_CURSOR_PASSTHROUGH;
}
+ if (seat_view == seat->cursor->pointer_view) {
+ seat->cursor->pointer_view = NULL;
+ }
+
wl_list_remove(&seat_view->view_destroy.link);
wl_list_remove(&seat_view->link);
free(seat_view);