~sircmpwn/wio

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
2

[PATCH 1/3] Use *cursor in view_begin_interative()

Leon Plickat
Details
Message ID
<20190611231512.4173-1-leonhenrik.plickat@stud.uni-goettingen.de>
Sender timestamp
1560294910
DKIM signature
missing
Download raw message
Patch: +1 -1
The variable is passed to the function but was not used. I assume it is
intended to be used.
---
 input.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/input.c b/input.c
index bc04104..40c4d9e 100644
--- a/input.c
+++ b/input.c
@@ -193,7 +193,7 @@ static void view_begin_interactive(struct wio_view *view,
	view->server->interactive.sy = (int)sy;
	view->server->input_state = state;
	wlr_xcursor_manager_set_cursor_image(view->server->cursor_mgr,
			"grabbing", view->server->cursor);
			cursor, view->server->cursor);
}

static void view_end_interactive(struct wio_server *server) {
-- 
2.22.0

[PATCH 2/3] Selection when spawning new view is now representative

Leon Plickat
Details
Message ID
<20190611231512.4173-2-leonhenrik.plickat@stud.uni-goettingen.de>
In-Reply-To
<20190611231512.4173-1-leonhenrik.plickat@stud.uni-goettingen.de> (view parent)
Sender timestamp
1560294911
DKIM signature
missing
Download raw message
Patch: +2 -2
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.
---
 input.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/input.c b/input.c
index 40c4d9e..99d1b4b 100644
--- 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, 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;
-- 
2.22.0

[PATCH 3/3] Selection when reshaping view is now representative

Leon Plickat
Details
Message ID
<20190611231512.4173-3-leonhenrik.plickat@stud.uni-goettingen.de>
In-Reply-To
<20190611231512.4173-1-leonhenrik.plickat@stud.uni-goettingen.de> (view parent)
Sender timestamp
1560294912
DKIM signature
missing
Download raw message
Patch: +2 -2
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.
---
 input.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/input.c b/input.c
index 99d1b4b..b4d8d13 100644
--- a/input.c
+++ b/input.c
@@ -332,8 +332,8 @@ static void handle_button_internal(
		}
		break;
	case INPUT_STATE_RESIZE_END:
		x1 = server->interactive.sx, x2 = server->cursor->x;
		y1 = server->interactive.sy, y2 = server->cursor->y;
		x1 = server->interactive.sx - window_border, x2 = server->cursor->x - window_border;
		y1 = server->interactive.sy - window_border, y2 = server->cursor->y - window_border;
		if (x2 < x1) {
			int _ = x1;
			x1 = x2;
-- 
2.22.0