From 333ab599022a645f92facf41cde03ab03866b08f Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Mon, 2 Apr 2018 20:39:33 -0400 Subject: Add wlr_surface_is_*_surface And wlr_*_surface_from_wlr_surface --- rootston/cursor.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'rootston') diff --git a/rootston/cursor.c b/rootston/cursor.c index 6252b6e1..6fb2688c 100644 --- a/rootston/cursor.c +++ b/rootston/cursor.c @@ -271,8 +271,9 @@ static void roots_cursor_press_button(struct roots_cursor *cursor, break; case WLR_BUTTON_PRESSED: roots_seat_set_focus(seat, view); - if (surface && !view) { - struct wlr_layer_surface *layer = surface->role_data; + if (wlr_surface_is_layer_surface(surface)) { + struct wlr_layer_surface *layer = + wlr_layer_surface_from_wlr_surface(surface); if (layer->current.keyboard_interactive) { roots_seat_set_focus_layer(seat, layer); } -- cgit v1.2.3