9front - general discussion about 9front
 help / color / mirror / Atom feed
* [9front] [patch] fix text sliding around in the mothra input bar.
@ 2021-05-13 20:50 james palmer
  2021-05-14 13:18 ` Sigrid Solveig Haflínudóttir
  0 siblings, 1 reply; 2+ messages in thread
From: james palmer @ 2021-05-13 20:50 UTC (permalink / raw)
  To: 9front


hello,

today i noticed this weird bug, if you move a mothra window,
the text in the input bar stays in the same place on the screen horizontally.
it came in with sigrid's changes to input handling in libpanel.

fix below.

- james

# HG changeset patch
# User james palmer <foura@biobuf.link>
# Date 1620937759 -3600
# Node ID 95ad1050de60c6fa16191db5aff5b1c4b0cc8150
# Parent  d06030dfe4ed915c55acf67d6c188beaac7b1f12
libpanel: fix text sliding around in libpanel text entry widgets.

diff -r d06030dfe4ed -r 95ad1050de60 sys/src/cmd/mothra/libpanel/entry.c
--- a/sys/src/cmd/mothra/libpanel/entry.c	Thu May 13 21:33:26 2021 +0100
+++ b/sys/src/cmd/mothra/libpanel/entry.c	Thu May 13 21:29:19 2021 +0100
@@ -64,10 +64,8 @@
 	ep = p->data;
 	b = p->b;
 
-	if(Dx(r) != Dx(ep->lastr)){
-		ep->text = r.min;
-		ep->lastr = r;
-	}
+	ep->text = r.min;
+	ep->lastr = r;
 	tick = ep->text;
 	tick.x += runestringnwidth(font, s, ep->a);


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [9front] [patch] fix text sliding around in the mothra input bar.
  2021-05-13 20:50 [9front] [patch] fix text sliding around in the mothra input bar james palmer
@ 2021-05-14 13:18 ` Sigrid Solveig Haflínudóttir
  0 siblings, 0 replies; 2+ messages in thread
From: Sigrid Solveig Haflínudóttir @ 2021-05-14 13:18 UTC (permalink / raw)
  To: 9front

Merged, thanks! :)


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-05-14 13:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-13 20:50 [9front] [patch] fix text sliding around in the mothra input bar james palmer
2021-05-14 13:18 ` Sigrid Solveig Haflínudóttir

9front - general discussion about 9front

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.vuxu.org/9front

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 9front 9front/ http://inbox.vuxu.org/9front \
		9front@9front.org
	public-inbox-index 9front

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.9front


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git