diff options
Diffstat (limited to 'sway/desktop')
-rw-r--r-- | sway/desktop/render.c | 20 | ||||
-rw-r--r-- | sway/desktop/xdg_shell.c | 2 | ||||
-rw-r--r-- | sway/desktop/xdg_shell_v6.c | 2 | ||||
-rw-r--r-- | sway/desktop/xwayland.c | 2 |
4 files changed, 23 insertions, 3 deletions
diff --git a/sway/desktop/render.c b/sway/desktop/render.c index 8a6f63aa..1d2f445d 100644 --- a/sway/desktop/render.c +++ b/sway/desktop/render.c @@ -891,6 +891,24 @@ static void render_floating(struct sway_output *soutput, } } +static void render_dropzones(struct sway_output *output, + pixman_region32_t *damage) { + struct sway_seat *seat; + wl_list_for_each(seat, &input_manager->seats, link) { + if (seat->operation == OP_MOVE_TILING && seat->op_target_node + && node_get_output(seat->op_target_node) == output) { + float color[4]; + memcpy(&color, config->border_colors.focused.indicator, + sizeof(float) * 4); + premultiply_alpha(color, 0.5); + struct wlr_box box; + memcpy(&box, &seat->op_drop_box, sizeof(struct wlr_box)); + scale_box(&box, output->wlr_output->scale); + render_rect(output->wlr_output, damage, &box, color); + } + } +} + void output_render(struct sway_output *output, struct timespec *when, pixman_region32_t *damage) { struct wlr_output *wlr_output = output->wlr_output; @@ -973,6 +991,8 @@ void output_render(struct sway_output *output, struct timespec *when, &output->layers[ZWLR_LAYER_SHELL_V1_LAYER_TOP]); } + render_dropzones(output, damage); + struct sway_seat *seat = input_manager_current_seat(input_manager); struct sway_container *focus = seat_get_focused_container(seat); if (focus && focus->view) { diff --git a/sway/desktop/xdg_shell.c b/sway/desktop/xdg_shell.c index b9ca396a..00448be7 100644 --- a/sway/desktop/xdg_shell.c +++ b/sway/desktop/xdg_shell.c @@ -333,7 +333,7 @@ static void handle_request_move(struct wl_listener *listener, void *data) { struct wlr_xdg_toplevel_move_event *e = data; struct sway_seat *seat = e->seat->seat->data; if (e->serial == seat->last_button_serial) { - seat_begin_move(seat, view->container, seat->last_button); + seat_begin_move_floating(seat, view->container, seat->last_button); } } diff --git a/sway/desktop/xdg_shell_v6.c b/sway/desktop/xdg_shell_v6.c index 0c121adc..d2c9a68b 100644 --- a/sway/desktop/xdg_shell_v6.c +++ b/sway/desktop/xdg_shell_v6.c @@ -330,7 +330,7 @@ static void handle_request_move(struct wl_listener *listener, void *data) { struct wlr_xdg_toplevel_v6_move_event *e = data; struct sway_seat *seat = e->seat->seat->data; if (e->serial == seat->last_button_serial) { - seat_begin_move(seat, view->container, seat->last_button); + seat_begin_move_floating(seat, view->container, seat->last_button); } } diff --git a/sway/desktop/xwayland.c b/sway/desktop/xwayland.c index 6761b6bc..3619f202 100644 --- a/sway/desktop/xwayland.c +++ b/sway/desktop/xwayland.c @@ -449,7 +449,7 @@ static void handle_request_move(struct wl_listener *listener, void *data) { return; } struct sway_seat *seat = input_manager_current_seat(input_manager); - seat_begin_move(seat, view->container, seat->last_button); + seat_begin_move_floating(seat, view->container, seat->last_button); } static void handle_request_resize(struct wl_listener *listener, void *data) { |