Recent activity

Re: [PATCH v3] gio: app: send keypress events for modifier keys in macos 3 months ago

From Jeff Williams to ~eliasnaur/gio-patches

That sounds good, and I agree to the DCO. Thanks for handling it!

On Wed, Dec 4, 2024 at 12:15 PM Elias Naur <mail@eliasnaur.com> wrote:
>
> Thank you. I forgot to ask you to sign off your change, so I added
> a Signed-off-by line by you because of my high latency.
>
> Please reply to this email and let me know whether you agree to the
> DCO https://developercertificate.org/ that the sign-off line implies.
>
> Thanks,
> Elias

[PATCH v3] gio: app: send keypress events for modifier keys in macos 4 months ago

From Jeff Williams to ~eliasnaur/gio-patches

This change generates keypress and release events for modifier keys in
MacOS. Specifically the Control, Alt, Shift and Command keys.
---
 app/os_macos.go | 27 +++++++++++++++++++++++++++
 app/os_macos.m  |  4 ++++
 2 files changed, 31 insertions(+)

diff --git a/app/os_macos.go b/app/os_macos.go
index d62bb645..ef51d7d6 100644
--- a/app/os_macos.go
+++ b/app/os_macos.go
@@ -340,6 +340,7 @@ type window struct {
	cursor      pointer.Cursor
	pointerBtns pointer.Buttons
[message trimmed]

Re: [PATCH v2] gio: app: send keypress events for modifier keys in macos 4 months ago

From Jeff Williams to ~eliasnaur/gio-patches

> Thank you for working on this. I've been more than usually busy and I apologize
> for the delayed review.

I completely understand, it's no problem at all! Thanks for reviewing it.

> > +var lastModsOnFlagsChanged C.NSUInteger
>
> This global variable probably belongs to the window type as a struct field.
> Perhaps shorten its name to `lastMods`.

Good suggestion, I'll do that.

> How about dropping the onFlagsChangedLogicTable and then ...

Send keypress events for modifier keys in macos 5 months ago

From Jeff Williams to ~eliasnaur/gio

Hi,

When there's time, would someone be able to review and merge the patch
I proposed here?

https://lists.sr.ht/~eliasnaur/gio-patches/patches/55261

It augments the GIO behaviour on MacOS to allow applications to
receive key Press and Release events when the Control, Alt, Shift, or
Command keys are used.

This is similar to [1] which did the same thing for the other OS that
GIO supports. I didn't have access to a Mac when the old patch was
submitted, so MacOS was missing from it. I do have access at the

Re: Shaping GNU Unifont causes panic 5 months ago

From Jeff Williams to ~eliasnaur/gio

Great! I didn't notice that version of typesetting would fix it,
that's good. I just tried the latest GIO and it works fine with
Unifont.

Re: Shaping GNU Unifont causes panic 5 months ago

From Jeff Williams to ~eliasnaur/gio

I forgot to include the diff for the fix in the last email. Here it is:

diff --git a/harfbuzz/ot_layout.go b/harfbuzz/ot_layout.go
index dc662d1..43856c3 100644
--- a/harfbuzz/ot_layout.go
+++ b/harfbuzz/ot_layout.go
@@ -244,6 +244,9 @@ func getRequiredFeature(g *font.Layout,
scriptIndex, languageIndex int) (uint16,
         return NoFeatureIndex, 0
     }
     index := l.RequiredFeatureIndex
+    if int(index) >= len(g.Features) {
+        return NoFeatureIndex, 0
+    }

Shaping GNU Unifont causes panic 5 months ago

From Jeff Williams to ~eliasnaur/gio

Hi folks,

I found an issue where a GIO program can panic in a package GIO depends on when
certain fonts are loaded. In particular, when I shape GNU unifont, I get a
panic in `github.com/go-text/typesetting` due to an index out of range [1]. I
have a fix for the typesetting package that corrects the issue [2].

The problem is that GIO depends on packages under the opentype/ subdirectory of
typesetting which is only present in an older version (v0.1.1), so committing
the fix to the head of typesetting won't help because GIO can't immediately use
the new version.

I see two solutions at the moment. One is to branch typesetting at v0.1.1 and
add the fix to both that branch and to the main branch.

[PATCH v2] gio: app: send keypress events for modifier keys in macos 5 months ago

From Jeff Williams to ~eliasnaur/gio-patches

This change generates keypress and release events for modifier keys in
MacOS. Specifically the Control, Alt, Shift and Command keys.
---
 app/os_macos.go | 50 +++++++++++++++++++++++++++++++++++++++++++++++++
 app/os_macos.m  |  4 ++++
 2 files changed, 54 insertions(+)

diff --git a/app/os_macos.go b/app/os_macos.go
index d62bb645..77d69e1b 100644
--- a/app/os_macos.go
+++ b/app/os_macos.go
@@ -561,6 +561,56 @@ func gio_onKeys(h C.uintptr_t, cstr C.CFTypeRef, ti C.double, mods C.NSUInteger,
	}
}
[message trimmed]

Re: [PATCH] gio: app: send keypress events for modifier keys in macos 5 months ago

From Jeff Williams to ~eliasnaur/gio-patches

Please hold off on reviewing and merging this. I realized after
sending it there may be a defect in it. I'll review and send a new
patch.

On Mon, Sep 30, 2024 at 10:00 PM Jeff Williams <kanobe@gmail.com> wrote:
>
> This change generates keypress and release events for modifier keys in
> MacOS. Specifically the Control, Alt, Shift and Command keys.
> ---
>  app/os_macos.go | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
>  app/os_macos.m  |  4 ++++
>  2 files changed, 52 insertions(+)
>
> diff --git a/app/os_macos.go b/app/os_macos.go

[PATCH] gio: app: send keypress events for modifier keys in macos 5 months ago

From Jeff Williams to ~eliasnaur/gio-patches

This change generates keypress and release events for modifier keys in
MacOS. Specifically the Control, Alt, Shift and Command keys.
---
 app/os_macos.go | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
 app/os_macos.m  |  4 ++++
 2 files changed, 52 insertions(+)

diff --git a/app/os_macos.go b/app/os_macos.go
index d62bb645..877b6a7c 100644
--- a/app/os_macos.go
+++ b/app/os_macos.go
@@ -561,6 +561,54 @@ func gio_onKeys(h C.uintptr_t, cstr C.CFTypeRef, ti C.double, mods C.NSUInteger,
	}
}
[message trimmed]