diff options
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; } |