~eliasnaur/gio

layout: ensure Flex{Alignment: Middle} respects minimum constraint

Before this change, the middle alignment would align according to
the widest child. This change aligns according to the widest child
or minimum constraint, whichever is largest.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
widget: take deleted runes into account when applying Editor.MaxLen

Signed-off-by: Elias Naur <mail@eliasnaur.com>
widget: report SubmitEvents for IME newlines in submit mode

Before this change, an IME text edit would always have its newlines
replaced with spaces. However, for Editors where Submit is enabled
we want newlines to result in SubmitEvents.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
Revert "io/router: [API] don't emit Enter and Leave events for touch input"

This reverts commit cd0c9dab9fcd2dd70f9f900f480473879d16f683. It turns out
that Enter/Leave is important for cancelling press-then-release-outside
for clickables.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
app: [android] fix insets

Previously, the Inset could be report wrongly when the bottom inset
is smaller than the top.

Signed-off-by: Inkeliz <inkeliz@inkeliz.com>
all: format comments with go fmt ./... using Go 1.19

Signed-off-by: Elias Naur <mail@eliasnaur.com>
app: [android] use GioView inside FrameLayout

Before that change, on Android, was impossible to overlay GioView with
a custom view. This change adds FrameLayout and renders GioView into
that, allowing to use addView from Android API.

Fixes: https://todo.sr.ht/~eliasnaur/gio/427
Signed-off-by: Inkeliz <inkeliz@inkeliz.com>
app/permission/wakelock: add package for requesting wake locks

Signed-off-by: Elias Naur <mail@eliasnaur.com>
all: add support for macOS to flake.nix

The Nix version of the macOS toolchain has difficulties compiling
Objective-C modules; disable modules instead of figuring out why.
It also doesn't include any frameworks automatically; add them explicitly.

While here, move suppression of OpenGL deprecation to a GL-specific
file.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
widget: add Editor.Filter for filtering unwanted characters

Signed-off-by: Elias Naur <mail@eliasnaur.com>
app: [macOS] don't miss pointer presses

We used to track the pressed pointer buttons through the global function
[NSEvent pressedMouseButtons]. However, it's possible that at the time a pointer
press event is delivered, the pointer button is up again. To ensure a consistent
view of the pointer press state, track it through the buttonNumber property on
delivered events.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
app: [windows] recover focus on click

Previously, Gio doesn't reclaim the focus when they lose that to a
parent window. In such a case, the child window can steal
keyboard focus, and Gio will never recover it.

Now, Gio will recover the focus when clicked.

Signed-off-by: Inkeliz <inkeliz@inkeliz.com>
widget: don't let unfocused Clickables swallow key presses

Signed-off-by: Elias Naur <mail@eliasnaur.com>
b67bef3e — Dominik Honnef 28 days ago
io/pointer: fix order of Cursor comments

Signed-off-by: Dominik Honnef <dominik@honnef.co>
b9416c7c — Dominik Honnef 28 days ago
f32: fix typo in comment

Signed-off-by: Dominik Honnef <dominik@honnef.co>
io/router: try all handlers if a key don't match the focus ancestor tree

When a key.InputOp is focused, a key.Event is matched to it and its ancestors.
If there is no focus, every handler is matched.
This change always matches to every handler, after checking the focus and
its ancestors.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
app: [Wayland] account for fallback decoration height in window sizes

Pass through a fallback window decoration height to the Wayland backend,
so that it can account for it when determining surface size.

Fixes: https://todo.sr.ht/~eliasnaur/gio/435
Signed-off-by: Elias Naur <mail@eliasnaur.com>
app: ensure no window wakeups are in flight when destroying it

When a window is destroyed, it is no longer valid to call its wakeup
method.

Thanks to Jack Mordaunt for identifying the race.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
internal/vk: fix wayland-client linking

Signed-off-by: psydvl <psydvl@fea.st>
app: [X11] send DestroyEvent after ViewEvent{}

Matches the other platforms.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
Next