|
|
|
@ -738,18 +738,6 @@ void roots_seat_begin_move(struct roots_seat *seat, struct roots_view *view) {
|
|
|
|
|
ROOTS_XCURSOR_MOVE, seat->cursor->cursor);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void roots_seat_cancel_move(struct roots_seat *seat) {
|
|
|
|
|
struct roots_cursor *cursor = seat->cursor;
|
|
|
|
|
struct roots_view *view = roots_seat_get_focus(seat);
|
|
|
|
|
|
|
|
|
|
if (cursor->mode != ROOTS_CURSOR_MOVE || view == NULL) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
cursor->mode = ROOTS_CURSOR_PASSTHROUGH;
|
|
|
|
|
view_move(view, cursor->view_x, cursor->view_y);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void roots_seat_begin_resize(struct roots_seat *seat, struct roots_view *view,
|
|
|
|
|
uint32_t edges) {
|
|
|
|
|
struct roots_cursor *cursor = seat->cursor;
|
|
|
|
@ -778,18 +766,6 @@ void roots_seat_begin_resize(struct roots_seat *seat, struct roots_view *view,
|
|
|
|
|
resize_name, seat->cursor->cursor);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void roots_seat_cancel_resize(struct roots_seat *seat) {
|
|
|
|
|
struct roots_cursor *cursor = seat->cursor;
|
|
|
|
|
struct roots_view *view = roots_seat_get_focus(seat);
|
|
|
|
|
|
|
|
|
|
if (cursor->mode != ROOTS_CURSOR_RESIZE || view == NULL) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
cursor->mode = ROOTS_CURSOR_PASSTHROUGH;
|
|
|
|
|
view_move_resize(view, cursor->view_x, cursor->view_y, cursor->view_width, cursor->view_height);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void roots_seat_begin_rotate(struct roots_seat *seat, struct roots_view *view) {
|
|
|
|
|
struct roots_cursor *cursor = seat->cursor;
|
|
|
|
|
cursor->mode = ROOTS_CURSOR_ROTATE;
|
|
|
|
@ -803,14 +779,27 @@ void roots_seat_begin_rotate(struct roots_seat *seat, struct roots_view *view) {
|
|
|
|
|
ROOTS_XCURSOR_ROTATE, seat->cursor->cursor);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void roots_seat_cancel_rotate(struct roots_seat *seat) {
|
|
|
|
|
void roots_seat_cancel_transform(struct roots_seat *seat) {
|
|
|
|
|
struct roots_cursor *cursor = seat->cursor;
|
|
|
|
|
struct roots_view *view = roots_seat_get_focus(seat);
|
|
|
|
|
|
|
|
|
|
if (cursor->mode != ROOTS_CURSOR_ROTATE || view == NULL) {
|
|
|
|
|
if (view == NULL) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
switch(cursor->mode) {
|
|
|
|
|
case ROOTS_CURSOR_MOVE:
|
|
|
|
|
view_move(view, cursor->view_x, cursor->view_y);
|
|
|
|
|
break;
|
|
|
|
|
case ROOTS_CURSOR_RESIZE:
|
|
|
|
|
view_move_resize(view, cursor->view_x, cursor->view_y, cursor->view_width, cursor->view_height);
|
|
|
|
|
break;
|
|
|
|
|
case ROOTS_CURSOR_ROTATE:
|
|
|
|
|
view->rotation = cursor->view_rotation;
|
|
|
|
|
break;
|
|
|
|
|
case ROOTS_CURSOR_PASSTHROUGH:
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
cursor->mode = ROOTS_CURSOR_PASSTHROUGH;
|
|
|
|
|
view->rotation = cursor->view_rotation;
|
|
|
|
|
}
|
|
|
|
|