aboutsummaryrefslogtreecommitdiff
path: root/sway/desktop/render.c
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-09-11 19:19:17 -0400
committerGitHub <noreply@github.com>2018-09-11 19:19:17 -0400
commit4fbec701fcf1505d1c13d7f5d8b55264b8f07e4e (patch)
tree82daa71d644f15c2e1e58ca9bdb2d4e1a75d3be9 /sway/desktop/render.c
parent822b45f4836c9a22af5a283e2aea6e4ecd514c22 (diff)
parent679c7eb08c16daea8e3e1cff7bcf179e116d0e8e (diff)
Merge pull request #2618 from RyanDwyer/tiling-drag
Implement tiling drag
Diffstat (limited to 'sway/desktop/render.c')
-rw-r--r--sway/desktop/render.c20
1 files changed, 20 insertions, 0 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) {