diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-04-02 20:39:33 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2018-04-02 20:42:02 -0400 |
commit | 333ab599022a645f92facf41cde03ab03866b08f (patch) | |
tree | d3b166067a1910313f60db47ff145d03108bd836 /rootston | |
parent | 9ae861c416e84feda2ffb577b97c43d6222560af (diff) |
Add wlr_surface_is_*_surface
And wlr_*_surface_from_wlr_surface
Diffstat (limited to 'rootston')
-rw-r--r-- | rootston/cursor.c | 5 |
1 files changed, 3 insertions, 2 deletions
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); } |