9front - general discussion about 9front
 help / color / mirror / Atom feed
From: james palmer <james@biobuf.link>
To: 9front@9front.org
Subject: [9front] [patch] fix text sliding around in the mothra input bar.
Date: Thu, 13 May 2021 21:50:17 +0100
Message-ID: <308EFB02035781D4F6CF8FD53FA2B543@biobuf.link> (raw)


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);


             reply	other threads:[~2021-05-14  7:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-13 20:50 james palmer [this message]
2021-05-14 13:18 ` Sigrid Solveig Haflínudóttir

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=308EFB02035781D4F6CF8FD53FA2B543@biobuf.link \
    --to=james@biobuf.link \
    --cc=9front@9front.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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