wio

a wayland wm stylised after plan9 rio - forked from git.sr.ht/~srcmpwn/wio
git clone git://src.gearsix.net/wio
Log | Files | Refs | Atom | Submodules | README | LICENSE

commit 97231a1a8f513f65315c773df71f8a1e43007d6d
parent 93dba5af6c5f7804c94e9b1cec980ce18de40541
Author: Leon Plickat <leonhenrik.plickat@stud.uni-goettingen.de>
Date:   Wed, 12 Jun 2019 03:59:19 +0200

Selection when reshaping view is now representative

The view was moved to far in the x and y direction compared to the
selection outline by exactly the size of the window border.

(Ammend to this and the previous patch, because apparantly I am blind
and did not see that the variable I was substracting was simply added to
the coordinates a few lines down. Was this added on purpose? Either way,
the selection being precise should be the correct way.)

Diffstat:
Minput.c | 10+++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/input.c b/input.c @@ -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 - window_border, x2 = server->cursor->x - window_border; - int y1 = server->interactive.sy - window_border, y2 = server->cursor->y - window_border; + int x1 = server->interactive.sx, x2 = server->cursor->x; + int y1 = server->interactive.sy, y2 = server->cursor->y; if (x2 < x1) { int _ = x1; x1 = x2; @@ -218,8 +218,8 @@ static void new_view(struct wio_server *server) { y2 = _; } struct wio_new_view *view = calloc(1, sizeof(struct wio_new_view)); - view->box.x = x1 + window_border; - view->box.y = y1 + window_border; + view->box.x = x1; + view->box.y = y1; view->box.width = x2 - x1; view->box.height = y2 - y1; int fd[2]; @@ -345,7 +345,7 @@ static void handle_button_internal( y2 = _; } wio_view_move(server->interactive.view, - x1 + window_border, y1 + window_border); + x1, y1); uint32_t width = x2 - x1, height = y2 - y1; if (width < 100) { width = 100;