#593 Centering new X11 window panics 30 days ago

Comment by ~inkeliz on ~eliasnaur/gio

I think something similar happens on macOS. However, instead of crashing it seems to cause a deadlock. :S

-- Lucas Rodrigues inkeliz@inkeliz.com

On Tue, Jun 18, 2024, at 9:31 PM, ~whereswaldon wrote:

The panic is because the window does not yet have a driver, since the Event method has not yet been called. I think we've seen some other reports of similar problems.

To my naive eyes, this seems like more of an ergonomics issue than anything. Can we queue up system actions until the first call to Event()? I've sent a proof-of-concept patch trying to implement this.

-- View on the web: https://todo.sr.ht/~eliasnaur/gio/593#event-373967

#591 [Android/iOS] Focus and SoftKeyboard issues a month ago

Ticket created by ~inkeliz on ~eliasnaur/gio

I'm hitting one bug, that is not reproducible on Gio 0.1. Basically that is what is happening:

  1. Clicking in one widget.Editor (gio one) and type something.
  2. Launch external view (such as Webview or any native dialog, out of Gio scope).

Now we have a problem: A) The input don't loses focus. B) Clicking on the input and typing don't edit the text, and the focus still on the external view.

On macOS that bug exists on Gio 0.1. On Windows that issue don't exists, and works fine.

Looking the Gio code, the "keyState.focus" don't seems to reset when the text input focus changes externally from Gio.

Also, we have issues with SoftKeyboard, on Android (untested on iOS):

  1. Click in one widget.Editor, type somthing.
  2. Close the keyboard (on your native Android button).
  3. Click again in the same Editor.

Now, it will NOT open the keyboard anymore. So, it keeps focused, but even clicking multiple times it will not open the SoftKeyboard.

That bug seems to be a regression, because couple of years ago I fixed something similar.

#589 [Android] Upcoming "Predictive Back" and "Edge-To-Edge Paddings" a month ago

Ticket created by ~inkeliz on ~eliasnaur/gio

On newer Android it's possible to trigger the 'Back Button' by touch in the border of the device, like swapping left.

That introduces two issues:

  1. It's required to know the touch-safe areas [1], that can be propagated to layout.Context and app.FrameEvent. In the end: it's user (who uses Gio) to follow such paddings.

    • The padding is not visual, but only touch, so don't make sense to apply that on app.NewContext.
    • I suggest some new field: TouchSafeInset (or similar names: TouchInset).
  2. It's required to handle the new "Back Button". [2]

    • Currently it's opt-in, but it can be mandatory in the future. We can either left it to the last minute, or opt-in to support this new API.

[1]. https://developer.android.com/design/ui/mobile/guides/patterns/predictive-back#edge-to-edge [2].https://developer.android.com/guide/navigation/custom-back/predictive-back-gesture#opt-predictive

#587 [Android] Java 11 vs Java 8 a month ago

Ticket created by ~inkeliz on ~eliasnaur/gio

Currently, it's documented:

"You will also need OpenJDK 1.8, as part of the Android build toolchain requires it. More recent versions of Java will break the build."

That was true for many years, however the newer versions of "D8" was compiled using Java 11, which causes:

"Exception in thread "main" java.lang.UnsupportedClassVersionError: com/android/tools/r8/D8 has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0"

Usually, I don't have issues with Java 11. But, now, it seems that we need at least 2 versions of Java (one to run D8 and another to build with Java 8), or use Java 11.

#568 cross build from Mac broker 3 months ago

Comment by ~inkeliz on ~eliasnaur/gio

You need to enable CGO, IIRC it's: CGO_ENABLED=1

The CGO is disabled when cross-compile (in that case cross-arch).

-- Lucas Rodrigues inkeliz@inkeliz.com

On Wed, Mar 27, 2024, at 2:57 PM, ~gedw99 wrote:

here is an example from gio-example/component.

I am using a macOS M1.

GOOS=darwin GOARCH=arm64 go build . go: downloading gioui.org v0.5.1-0.20240306204944-993ec907be4b go: downloading gioui.org/x v0.5.0 go: downloading golang.org/x/exp/shiny v0.0.0-20220906200021-fcb1a314c389 go: downloading golang.org/x/image v0.7.0 go: downloading golang.org/x/exp v0.0.0-20230905200255-921286631fa9 go: downloading github.com/go-text/typesetting v0.0.0-20230803102845-24e03d8b5372 go: downloading golang.org/x/text v0.13.0 go: downloading gioui.org/cpu v0.0.0-20210817075930-8d6a761490d2 go: downloading gioui.org/shader v1.0.8 apple@apples-MacBook-Pro component % GOOS=darwin GOARCH=amd64 go build .


../../../../pkg/mod/gioui.org@v0.5.1-0.20240306204944-993ec907be4b/internal/gl/util.go:11:25: undefined: Functions ../../../../pkg/mod/gioui.org@v0.5.1-0.20240306204944-993ec907be4b/internal/gl/util.go:40:32: undefined: Functions ../../../../pkg/mod/gioui.org@v0.5.1-0.20240306204944-993ec907be4b/internal/gl/util.go:60:24: undefined: Functions GOOS=windows GOARCH=arm64 go build . go: downloading golang.org/x/sys v0.12.0 GOOS=windows GOARCH=amd64 go build .

So its building for windows for arm64 and amd64, but not for darwin amd64.

-- View on the web: https://todo.sr.ht/~eliasnaur/gio/568#event-338289

#544 Kitchen example background black in Chrome + Windows 9 months ago

on ~eliasnaur/gio

CC ~inkeliz because I'm far from the expert on WebGL. Would it be ok to remove "desynchronized: false"?

#537 svg2gio unsupported tag 9 months ago

on ~eliasnaur/gio

On 2023-10-04 21:22, ~inkeliz wrote:

I'm not sure if it will work, but you can try https://github.com/inkeliz/giosvg, it supports both: runtime and comptime (in the same weird API).

Thanks! i've looked into this and unfortunately it does not support images, and with that i presume svg2gio doesn't either :(

back to PNGs..

#537 svg2gio unsupported tag 9 months ago

Comment by ~inkeliz on ~eliasnaur/gio

#I'm not sure if it will work, but you can try https://github.com/inkeliz/giosvg, it supports both: runtime and comptime (in the same weird API).

Lucas Rodrigues inkeliz@inkeliz.com

On Wed, Oct 4, 2023, at 7:12 PM, ~sewn wrote:

Hi, i'm not sure if this is the relevant place to file a 'bug' but seeing as the gio-cmd repository has issues disabled, i can't do much.

I want to use a SVG as a logo in my program instead of relying either on:

  1. embedding a big logo image into the binary and decode it at run-time

  2. including the logo which is only used at gui and decode it at run-time, but passing it around various different functions, methods and routines.

and considering that to use a high quality image of the logo, i need to downscale the image at run-time which might be expensive(?)

i've looked into the gio-cmd's svg2gio for my project's svg and i get this error:

 unsupported tag: <defs>

what can i do?

-- View on the web: https://todo.sr.ht/~eliasnaur/gio/537

#517 [Feature Request] Editor input with password hint 1 year, 3 days ago

Comment by ~inkeliz on ~eliasnaur/gio

#513 x/explorer: compilation failure with (upcoming) Go-1.21 1 year, 9 days ago

Comment by ~inkeliz on ~eliasnaur/gio

RIP CallImport.

That is caused because the undocumented CallImport was replaced by //go:wasmimport. Since keeping both is quite unmaintainable, it's easier to move everything to syscall/js (which is also not stable, and slower).

The issue caused by using syscall/js is one additional copy each time. I will send one PR to replace it, maybe at the end of this week.

-- Lucas Rodrigues inkeliz@inkeliz.com

On Mon, Jul 10, 2023, at 4:37 PM, ~sbinet wrote:

trying to compile x/explorer@v0.1.0 with the upcoming Go-1.21 version (and its new wasip1/wasm target), leads to:

$> gogio -x -target js  -o _wasm ./my-app
go list -f {{.ImportPath}} ./cmd/varda
go list -f {{.Dir}} ./cmd/varda
go build -ldflags=-X gioui.org/app/internal/log.appID=org.example.myapp 
-tags= -o _wasm/main.wasm ./cmd/varda
gogio: go build -ldflags=-X 
gioui.org/app/internal/log.appID=org.example.myapp -tags= -o 
_wasm/main.wasm ./cmd/varda failed: # gioui.org/x/explorer
unrecognized instruction "CallImport"
unrecognized instruction "CallImport"
unrecognized instruction "CallImport"
asm: assembly of 
../../gocode/pkg/mod/gioui.org/x@v0.1.0/explorer/explorer_js.s failed

(the same code does compile successfully with Go-1.19.x and Go-1.20.x)

-- View on the web: https://todo.sr.ht/~eliasnaur/gio/513