diff options
author | Tony Crisci <tony@dubstepdish.com> | 2018-01-21 18:32:06 -0500 |
---|---|---|
committer | Tony Crisci <tony@dubstepdish.com> | 2018-01-21 18:37:36 -0500 |
commit | 54776dd19c20b0d0775a9426e811f81004a9a960 (patch) | |
tree | cf0251210134a8e69ac26e2f66f522af0ab00524 /rootston | |
parent | 41832714758c003c557da30193c6b02a2afe54b2 (diff) |
fix cursor issue
Diffstat (limited to 'rootston')
-rw-r--r-- | rootston/cursor.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/rootston/cursor.c b/rootston/cursor.c index 87f568a8..8f6091ee 100644 --- a/rootston/cursor.c +++ b/rootston/cursor.c @@ -74,6 +74,9 @@ static void seat_view_deco_motion(struct roots_seat_view *view, double deco_sx, } static void seat_view_deco_leave(struct roots_seat_view *view) { + struct roots_cursor *cursor = view->seat->cursor; + wlr_xcursor_manager_set_cursor_image(cursor->xcursor_manager, + cursor->default_xcursor, cursor->cursor); view->has_button_grab = false; } @@ -86,6 +89,13 @@ static void seat_view_deco_button(struct roots_seat_view *view, double sx, } else { view->has_button_grab = false; } + + enum wlr_deco_part parts = view_get_deco_part(view->view, sx, sy); + if (state == WLR_BUTTON_RELEASED && (parts & WLR_DECO_PART_TITLEBAR)) { + struct roots_cursor *cursor = view->seat->cursor; + wlr_xcursor_manager_set_cursor_image(cursor->xcursor_manager, + cursor->default_xcursor, cursor->cursor); + } } static void roots_cursor_update_position(struct roots_cursor *cursor, @@ -246,8 +256,6 @@ static void roots_cursor_press_button(struct roots_cursor *cursor, if (state == WLR_BUTTON_RELEASED && cursor->mode != ROOTS_CURSOR_PASSTHROUGH) { cursor->mode = ROOTS_CURSOR_PASSTHROUGH; - wlr_xcursor_manager_set_cursor_image(cursor->xcursor_manager, - cursor->default_xcursor, cursor->cursor); if (seat->seat->pointer_state.button_count == 0) { return; } |