~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 2

[PATCH wio 0/1] Fix for selections with "negative" width or height

Details
Message ID
<160434422755.29183.825082608262768268-0@git.sr.ht>
DKIM signature
missing
Download raw message
When using the "New" or "Resize" elements, wio crash then the cursor
goes to the left of the window, or above it.
This patch takes the
absolute value of the X and Y distance between the top-left corner of
the window and the cursor to draw the new area, thus preventing crashes
when going the "negative way" with the cursor.

Willy Goiffon (1):
  Handle new/resize with negative cursor coordinates

 output.c | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

-- 
2.26.2

[PATCH wio 1/1] Handle new/resize with negative cursor coordinates

Details
Message ID
<160434422755.29183.825082608262768268-1@git.sr.ht>
In-Reply-To
<160434422755.29183.825082608262768268-0@git.sr.ht> (view parent)
DKIM signature
missing
Download raw message
Patch: +11 -5
From: Willy Goiffon <dev@z3bra.org>

---
 output.c | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/output.c b/output.c
index 6a059f5..c0877fe 100644
--- a/output.c
+++ b/output.c
@@ -269,6 +269,7 @@ static void render_layer(
}

static void output_frame(struct wl_listener *listener, void *data) {
	double x1, x2, y1, y2;
	struct wio_output *output = wl_container_of(listener, output, frame);
	struct wio_server *server = output->server;
	struct wlr_renderer *renderer = server->renderer;
@@ -350,11 +351,16 @@ static void output_frame(struct wl_listener *listener, void *data) {
		break;
	case INPUT_STATE_NEW_END:
	case INPUT_STATE_RESIZE_END:
		render_view_border(renderer, output, NULL,
			server->interactive.sx, server->interactive.sy,
			server->cursor->x - server->interactive.sx,
			server->cursor->y - server->interactive.sy,
			1);
		x1 = server->cursor->x < server->interactive.sx ?
			server->cursor->x : server->interactive.sx;
		y1 = server->cursor->y < server->interactive.sy ?
			server->cursor->y : server->interactive.sy;
		x2 = server->cursor->x > server->interactive.sx ?
			server->cursor->x : server->interactive.sx;
		y2 = server->cursor->y > server->interactive.sy ?
			server->cursor->y : server->interactive.sy;

		render_view_border(renderer, output, NULL, x1, y1, x2 - x1, y2 - y1, 1);
		break;
	default:
		break;
-- 
2.26.2

Re: [PATCH wio 1/1] Handle new/resize with negative cursor coordinates

Details
Message ID
<C6T0KUMAM043.T75R43MF0SU8@taiga>
In-Reply-To
<160434422755.29183.825082608262768268-1@git.sr.ht> (view parent)
DKIM signature
missing
Download raw message
Thanks!

To git@git.sr.ht:~sircmpwn/wio
   31b742e..  master -> master
Reply to thread Export thread (mbox)