aboutsummaryrefslogtreecommitdiff
path: root/rootston/cursor.c
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2017-11-05 16:29:43 +0100
committeremersion <contact@emersion.fr>2017-11-05 16:29:43 +0100
commit03d3fdc15879c6fbdd24d5fe1d60f9a77402220d (patch)
treef442d9c2cf8e73393d5fa8474b584aae2bae3afe /rootston/cursor.c
parent74a45ee776ec05b5dbe7bae5be456ba08a850d7b (diff)
Basic maximization implementation for xdg-shell
Diffstat (limited to 'rootston/cursor.c')
-rw-r--r--rootston/cursor.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/rootston/cursor.c b/rootston/cursor.c
index b153e8c8..d97d518e 100644
--- a/rootston/cursor.c
+++ b/rootston/cursor.c
@@ -39,6 +39,8 @@ static void cursor_set_xcursor_image(struct roots_input *input,
void view_begin_move(struct roots_input *input, struct wlr_cursor *cursor,
struct roots_view *view) {
+ view_maximize(view, false);
+
input->mode = ROOTS_CURSOR_MOVE;
input->offs_x = cursor->x;
input->offs_y = cursor->y;
@@ -54,6 +56,8 @@ void view_begin_move(struct roots_input *input, struct wlr_cursor *cursor,
void view_begin_resize(struct roots_input *input, struct wlr_cursor *cursor,
struct roots_view *view, uint32_t edges) {
+ view_maximize(view, false);
+
input->mode = ROOTS_CURSOR_RESIZE;
input->offs_x = cursor->x;
input->offs_y = cursor->y;
@@ -74,6 +78,8 @@ void view_begin_resize(struct roots_input *input, struct wlr_cursor *cursor,
void view_begin_rotate(struct roots_input *input, struct wlr_cursor *cursor,
struct roots_view *view) {
+ view_maximize(view, false);
+
input->mode = ROOTS_CURSOR_ROTATE;
input->offs_x = cursor->x;
input->offs_y = cursor->y;
@@ -102,7 +108,8 @@ void cursor_update_position(struct roots_input *input, uint32_t time) {
set_compositor_cursor = view_client != input->cursor_client;
}
if (set_compositor_cursor) {
- struct wlr_xcursor *xcursor = get_default_xcursor(input->xcursor_theme);
+ struct wlr_xcursor *xcursor =
+ get_default_xcursor(input->xcursor_theme);
cursor_set_xcursor_image(input, xcursor->images[0]);
input->cursor_client = NULL;
}