~sircmpwn/wio

93dba5af6c5f7804c94e9b1cec980ce18de40541 — Leon Plickat 4 years ago 5cf3c7b
Selection when spawning new view is now representative

The new view was spawned to far in the x and y directions compared to
the selection outline by exactly the size of the window border. I decided
to move the new view instead of the selection as I think the selection
looks good placement-wise in relation to the pointer.
1 files changed, 2 insertions(+), 2 deletions(-)

M input.c
M input.c => input.c +2 -2
@@ 205,8 205,8 @@ static void view_end_interactive(struct wio_server *server) {
}

static void new_view(struct wio_server *server) {
	int x1 = server->interactive.sx, x2 = server->cursor->x;
	int y1 = server->interactive.sy, y2 = server->cursor->y;
	int x1 = server->interactive.sx - window_border, x2 = server->cursor->x - window_border;
	int y1 = server->interactive.sy - window_border, y2 = server->cursor->y - window_border;
	if (x2 < x1) {
		int _ = x1;
		x1 = x2;