~rabbits/public-inbox

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 noodle 0/1] Fix issue where finishing stroke outside of canvas leaves buttons unclickable

Details
Message ID
<164545626144.29838.3032337248970904626-0@git.sr.ht>
DKIM signature
missing
Download raw message
This patch fixes a small bug with how noodle handles brush strokes that
end outside of the canvas.

= Bug =

== Replicating ==
1. Start drawing in the canvas
2. Do not release the mouse until the cursor has left the canvas
3. Before reentering the canvas, attempt to click UI elements outside of
   the canvas

== Expected behaviour ==
Everything works as normal : )

== Actual behaviour ==
Nothing outside of the canvas can be clicked, until the mouse moves back
inside the canvas : (

== Cause ==
`cursor/last` is used to stop accidental interactions with the rest of
the UI while the user is drawing.

This allows the user to leave and return to the canvas with their mouse
held down, without accidentally mashing buttons.

As `cursor/last` is only recorded while the mouse is in the canvas,
however, releasing the mouse outside of the canvas goes undetected.

== Fix ==
Detect mouse releases outside of the canvas, and change `cursor/last` as
usual, restoring UI functionality :^)

Hoolean (1):
  Fixed issue where finishing stroke outside of canvas leaves buttons
    unclickable

 src/main.tal | 5 +++++
 1 file changed, 5 insertions(+)

-- 
2.32.0

[PATCH noodle 1/1] Fixed issue where finishing stroke outside of canvas leaves buttons unclickable

Details
Message ID
<164545626144.29838.3032337248970904626-1@git.sr.ht>
In-Reply-To
<164545626144.29838.3032337248970904626-0@git.sr.ht> (view parent)
DKIM signature
missing
Download raw message
Patch: +5 -0
From: Hoolean <me@hoolean.com>

---
 src/main.tal | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/main.tal b/src/main.tal
index 7c12074..d2145b0 100644
--- a/src/main.tal
+++ b/src/main.tal
@@ -246,6 +246,11 @@ BRK
	OVR2 OVR2 .canvas ;within-rect JSR2
		;on-touch-canvas JCN2

	( record mouse release outside of canvas )
	.Mouse/state DEI #00 ! ,skip JCN
		#00 .cursor/last STZ
		@skip

	( only when click originates in pane )
	.Mouse/state DEI .cursor/last LDZ #0100 !! ,&end JCN

-- 
2.32.0

[noodle/patches/.build.yml] build failed

builds.sr.ht <builds@sr.ht>
Details
Message ID
<CI1TKJXFD9M7.1E7MGF27X8S9L@cirno>
In-Reply-To
<164545626144.29838.3032337248970904626-1@git.sr.ht> (view parent)
DKIM signature
missing
Download raw message
noodle/patches/.build.yml: FAILED in 17s

[Fix issue where finishing stroke outside of canvas leaves buttons unclickable][0] from [~hoolean][1]

[0]: https://lists.sr.ht/~rabbits/public-inbox/patches/29671
[1]: me@hoolean.com

✗ #701173 FAILED noodle/patches/.build.yml https://builds.sr.ht/~rabbits/job/701173
Reply to thread Export thread (mbox)