~goleo/wio

34233e53b76710cfdb97d1639d72275db1fcb11b — Leonid Bobrov 1 year, 1 month ago c48c8a7
Don't allow parallel borders to intersect
1 files changed, 10 insertions(+), 1 deletions(-)

M view.c
M view.c => view.c +10 -1
@@ 6,7 6,16 @@
#include "view.h"

#define less_swap1(A, B) { if (A < B) { int C = A; A = B; B = C + window_border * 2 * scale; } }
#define less_swap2(A, B) { if (A < B) { int C = A; A = B - window_border * 2 * scale; B = C; } }
#define less_swap2(A, B) { \
	if (A < B - window_border * scale) { \
		int C = A; A = B - window_border * 2 * scale; B = C; \
		if (A - B < 0) { \
			B = A; \
		} \
	} else if (A - B < 0) { \
		A = B; \
	} \
}

static void xdg_surface_map(struct wl_listener *listener, void *data) {
	struct wio_view *view = wl_container_of(listener, view, map);