aboutsummaryrefslogtreecommitdiffstats
path: root/sway/desktop/render.c
diff options
context:
space:
mode:
authorLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-09-11 21:34:21 +1000
committerLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-09-11 21:34:21 +1000
commit8bb40c24c7b045df0d43e9f22c096d1473f6f9f6 (patch)
tree0c4dbac1173f92337e2cff63d45c7d8fe7a3557f /sway/desktop/render.c
parentIntroduce tiling_drag directive (diff)
downloadsway-8bb40c24c7b045df0d43e9f22c096d1473f6f9f6.tar.gz
sway-8bb40c24c7b045df0d43e9f22c096d1473f6f9f6.tar.zst
sway-8bb40c24c7b045df0d43e9f22c096d1473f6f9f6.zip
Implement tiling drag
Hold floating_modifier and drag a tiling view to a new location.
Diffstat (limited to 'sway/desktop/render.c')
-rw-r--r--sway/desktop/render.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/sway/desktop/render.c b/sway/desktop/render.c
index 8a6f63aa..8b5b3e95 100644
--- a/sway/desktop/render.c
+++ b/sway/desktop/render.c
@@ -891,6 +891,21 @@ static void render_floating(struct sway_output *soutput,
891 } 891 }
892} 892}
893 893
894static void render_dropzones(struct sway_output *output,
895 pixman_region32_t *damage) {
896 struct sway_seat *seat;
897 wl_list_for_each(seat, &input_manager->seats, link) {
898 if (seat->operation == OP_MOVE_TILING && seat->op_target_node
899 && node_get_output(seat->op_target_node) == output) {
900 float color[4];
901 memcpy(&color, config->border_colors.focused.indicator,
902 sizeof(float) * 4);
903 premultiply_alpha(color, 0.5);
904 render_rect(output->wlr_output, damage, &seat->op_drop_box, color);
905 }
906 }
907}
908
894void output_render(struct sway_output *output, struct timespec *when, 909void output_render(struct sway_output *output, struct timespec *when,
895 pixman_region32_t *damage) { 910 pixman_region32_t *damage) {
896 struct wlr_output *wlr_output = output->wlr_output; 911 struct wlr_output *wlr_output = output->wlr_output;
@@ -973,6 +988,8 @@ void output_render(struct sway_output *output, struct timespec *when,
973 &output->layers[ZWLR_LAYER_SHELL_V1_LAYER_TOP]); 988 &output->layers[ZWLR_LAYER_SHELL_V1_LAYER_TOP]);
974 } 989 }
975 990
991 render_dropzones(output, damage);
992
976 struct sway_seat *seat = input_manager_current_seat(input_manager); 993 struct sway_seat *seat = input_manager_current_seat(input_manager);
977 struct sway_container *focus = seat_get_focused_container(seat); 994 struct sway_container *focus = seat_get_focused_container(seat);
978 if (focus && focus->view) { 995 if (focus && focus->view) {