9front - general discussion about 9front
 help / color / mirror / Atom feed
From: Silas McCroskey <inkswinc@gmail.com>
To: 9front@9front.org
Subject: [9front] PATCH: click-to-focus in fgui
Date: Mon, 9 Aug 2021 15:59:27 -0700	[thread overview]
Message-ID: <CAHjwAuxt_wpr6CrfFSJGq0X3=ABQbS-1e-2UyAsi6HpanuHDfQ@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1039 bytes --]

fgui uses libcontrol, which defaults to hover-focus. This is both
inconsistent with the rest of the system (bar acme) and potentially
dangerous in fgui's specific case, due to the secrets involved.

The following patch turns the libcontrol knob to switch to click-to-focus.

Not sure this merits being merged per se, but it's at least here for
anyone else to pick up.

Attached as well since gmail will inevitably mangle it.

- sam-d

---

/mnt/git/object/40fc48cc7bd2bf10bb304e6d1212abcde6c15066/tree/sys/src/cmd/auth/factotum/fgui.c
+++ sys/src/cmd/auth/factotum/fgui.c
@@ -294,6 +294,7 @@
  /* create a new control set for the confirmation */
  openkmr();
  cs = newcontrolset(screen, kbdc, mousec, resizec);
+ cs->clicktotype = 1;

  createtext(cs, "msg");
  chanprint(cs->ctl, "msg image paleyellow");
@@ -534,6 +535,7 @@
  /* create a new control set for the confirmation */
  openkmr();
  cs = newcontrolset(screen, kbdc, mousec, resizec);
+ cs->clicktotype = 1;

  /* count attributes and allocate entry controls */
  entries = 0;

[-- Attachment #2: fgui-clickfocus.patch --]
[-- Type: application/octet-stream, Size: 605 bytes --]

--- /mnt/git/object/40fc48cc7bd2bf10bb304e6d1212abcde6c15066/tree/sys/src/cmd/auth/factotum/fgui.c
+++ sys/src/cmd/auth/factotum/fgui.c
@@ -294,6 +294,7 @@
 	/* create a new control set for the confirmation */
 	openkmr();
 	cs = newcontrolset(screen, kbdc, mousec, resizec);
+	cs->clicktotype = 1;
 
 	createtext(cs, "msg");
 	chanprint(cs->ctl, "msg image paleyellow");
@@ -534,6 +535,7 @@
 	/* create a new control set for the confirmation */
 	openkmr();
 	cs = newcontrolset(screen, kbdc, mousec, resizec);
+	cs->clicktotype = 1;
 
 	/* count attributes and allocate entry controls */
 	entries = 0;

             reply	other threads:[~2021-08-10  7:21 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-09 22:59 Silas McCroskey [this message]
2021-08-10 14:19 ` ori
2021-08-11  5:28   ` rgl
2021-08-11 20:49     ` Philip Silva
2021-08-11 21:09       ` Steve Simon
2021-08-11 22:37       ` Xiao-Yong Jin
2021-08-12  9:05         ` hiro
2021-08-12 14:36           ` Eckard Brauer
2021-08-13  6:44             ` unobe
2021-08-13  7:10               ` hiro
2021-08-14 10:20                 ` Eckard Brauer
2021-08-14 13:09                   ` qwx
2021-08-14 15:03                     ` Stuart Morrow
2021-08-14 13:17                   ` José Miguel Sánchez García
2021-08-14 20:57                     ` Patch-keeping (Was Re: [9front] PATCH: click-to-focus in fgui) unobe
2021-08-14 15:04                   ` [9front] PATCH: click-to-focus in fgui Stuart Morrow
2021-08-14 18:08                   ` hiro
2021-08-14 21:43                     ` unobe
2021-08-15  6:47                       ` hiro
2021-08-14 21:46                   ` unobe
2021-08-15 13:36                     ` Eckard Brauer
2021-08-15 19:16                       ` hiro
2021-08-15 17:31                   ` kvik
2021-08-15 18:34                     ` Kurt H Maier
2021-08-15 18:48                     ` Stanley Lieber
2021-08-15 20:18                       ` Eckard Brauer
2021-08-15 22:35                         ` Stanley Lieber
2021-08-16  5:14                           ` Stanley Lieber
2021-08-16 15:46                             ` Skylar Bleed
2021-08-15 19:03                     ` hiro
2021-08-16 16:40                       ` kvik
2021-08-16 19:25                         ` Stuart Morrow
2021-08-16 19:40                           ` Kurt H Maier
2021-08-17  2:05                             ` Stanley Lieber
2021-08-16 20:04                         ` hiro
2021-08-16 20:13                         ` hiro
2021-08-17  1:10                           ` Xiao-Yong Jin
2021-08-17  8:11                             ` hiro
2021-08-12  0:12       ` hiro
2021-08-15  4:29       ` ori
2021-08-16 19:40 ` ori

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='CAHjwAuxt_wpr6CrfFSJGq0X3=ABQbS-1e-2UyAsi6HpanuHDfQ@mail.gmail.com' \
    --to=inkswinc@gmail.com \
    --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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).