~inkeliz

Recent activity

Re: Detecting whether a window is currently visible 6 months ago

From Lucas Rodrigues to ~eliasnaur/gio

Hi,

I have currently migrated almost everything to the latest version, but 
ConfigEvent.Focused doesn't work.

I reported some issues about this on gio-todo. However, the issue affects multiple 
OSes (from WASM to iOS) on different levels.

I can summarize all issues:

1. Focused is not triggered when the page is not visible (WASM). It happens before,
using visibilitychange.

2. Focused is triggered incorrectly if another view in the same window has focus,

Re: unbounded slice growth in Router.Event()? 6 months ago

From Lucas Rodrigues to ~eliasnaur/gio

I notice that yesterday, while woking on my year-long PR [0]. Seems that exists two 
`scratchFilters`, one of them is on the "root" and another inside "Key" sub-struct.

The "key sub-struct" only appends, but never resets or it's used. I silent remove it [1],
I'm not aware of any side-effect. Try to remove this append line and check if stuff
still running.


[0] https://github.com/gioui/gio/pull/117/commits/e6f6b3d76e61f314ece1755dd3ce6785dc9af9c1
[1] https://github.com/gioui/gio/pull/117/commits/e6f6b3d76e61f314ece1755dd3ce6785dc9af9c1#diff-c04c544d7677b4f40b53717995fb8f2e3d67212768e651e229ef2c020fc0d357L306-L308

-- 
  Lucas Rodrigues
  inkeliz@inkeliz.com

Re: gogio issues finding packages 7 months ago

From Lucas Rodrigues to ~eliasnaur/gio

The "safe" maximum OpenJDK is 8 (with some luck: 11), IIRC. Gio uses D8 tool [0], 
which is stuck on Java 8. Gio also uses JDK8 on CI [1], so it's the recommended
version.

[0]: https://developer.android.com/tools/d8
[1]: https://github.com/gioui/gio/blob/main/.builds/linux.yml#L70-L72
-- 
  Lucas Rodrigues
  inkeliz@inkeliz.com

On Fri, May 10, 2024, at 5:23 PM, Sean E. Russell wrote:
> Well, for anyone else encountering issues and finding this thread: I downgraded
> to Java 17 and `-buildmode exe` works. Haven't tried running it yet, but the
> build works. So the maximum compatible Java version is [17,22)

Re: Screen orientation and webview plugin 7 months ago

From Lucas Rodrigues to ~eliasnaur/gio

Hi,

The gioui-plugins are not officially supported by the Gio maintainers, it's not
part of Gio project "umbrella". The gioui-plguins is (poorly) maintained by me, 
independently, and it's just one open-sourced version of some components 
used in a closed-source app.

These plugins are used in a specific commercial application that is not 
open-source. So, all features have been developed and only exists to meet
the needs of this application. Our app uses a fixed-oriented
(which is also a feature that I introduced to Gio, see the commit at 
https://github.com/gioui/gio/commit/d51d8b4). I suggest to open one issue in 
the GitHub repository, then I can better track that issue. Note, that this 
project also current lacks tests (CI), which makes things harder to proper

Re: Detecting whether a window is currently visible 7 months ago

From Lucas Rodrigues to ~eliasnaur/gio

I haven't upgraded to version 0.5 or 0.6 yet. I'm still on 0.1-ish. I'm hope to migrate 
to 0.6 by June.

In the meantime, I use system.StageEvent for:

- Turning off Gio animations and components (like webview) when not visible.
- Implementing workarounds for Safari, due to limitations with onClick.
- Automatically filling in the sign-up confirmation code. If the user minizes the app 
on "Enter Code" page and then returns, it will read the code from the clipboard 
and check it in automatically (if it's a valid format).

As I said, I didn't move to 0.6, so I'm not sure if any of my use-case is affected.

--

Re: Can't dismiss keyboard on mobile 10 months ago

From Lucas Rodrigues to ~eliasnaur/gio

Typically, mobile keyboards close when you click 'outside', 
but Gio does not handle this automatically. You can create a 
new clip.Rect and listen for clicksqtouches. Then, use 
op.SoftKeyboardOp{Show: false}.Add(...) to close the keyboard.

-- 
  Lucas Rodrigues
  inkeliz@inkeliz.com

On Sun, Jan 14, 2024, at 6:30 AM, kennedy@dreacotgroup.com wrote:
> The editor doesn't seem to support disappearing keyboard on mobile, so 
> when we focus on the Editor, the keyboard shows and there is no way to 
> hide it

Re: [PROPOSAL] Event based IPC (inter-process communication) using WM_COPYDATA 1 year, 14 days ago

From Lucas Rodrigues to ~eliasnaur/gio

Not directly related, but one PR(https://github.com/gioui/gio/pull/117/files) uses 
WM_COPYDATA to handle "deeplinking" on Windows. (Previously, the original
PR used "named-mmap").

-- 
  Lucas Rodrigues
  inkeliz@inkeliz.com

On Thu, Nov 30, 2023, at 8:58 AM, Egon Elbre wrote:
> Btw. It's possible to pipes for IPC, which is also more cross-platform
> and doesn't require integrating with the windowing framework.
>
> Also, there are other approaches
> https://learn.microsoft.com/en-us/windows/win32/ipc/interprocess-communications

Re: File System Access API 1 year, 6 months ago

From Lucas Rodrigues to ~eliasnaur/gio

Well... Safari doesn't support `showSaveFilePicker`, 
https://caniuse.com/?search=showSaveFilePicker.

Sounds like Safari only supports "Origin Private File System", which
is a subset of File System Access API. That API only allows the
website/origin to store contents, without user interaction

You can read more about that on https://developer.chrome.com/articles/origin-private-file-system/#the-user-visible-versus-the-origin-private-file-system. In general, that is a 
"file-based" version of Localstorage, you can access and
read files that is exclusive to the origin/website, and not
intended to be visible directly by the user. That is not
useful to explorer package.

_I'm assuming that "Can I Use" is correct, I didn't test that._

Re: File System Access API 1 year, 6 months ago

From Lucas Rodrigues to ~eliasnaur/gio

I have implemented support for File System Access API, at
gio-plugins[0], while ago.

I'll "backport" that to gio/x at some point. Also, make it compatible 
against Go 1.21 changes. I can't do that right now, because I'm at the 
end of the semester, I have a lot of work and exams. 😓

Also, I'm not sure if we should migrate to File System Access and 
drop support for the older one, or keep both. The major issue is iOS,
because Safari isn't "everygreen", it requires OS update to get an
new browser.

[0]: https://github.com/gioui-plugins/gio-plugins/blob/main/explorer/explorer_js.go#L31-L41

Re: High refresh rate support on Android 1 year, 7 months ago

From Lucas Rodrigues to ~eliasnaur/gio

Instead of calling using JNI, it's not possible to do all the work on Java, 
and then do a single JNI call? In that case, modify the current 
`GioActivity.java`, or similar, and then call the new function using JNI.

-- 
  Lucas Rodrigues
  inkeliz@inkeliz.com

On Sun, Apr 16, 2023, at 8:02 AM, Ilia Demianenko wrote:
> That does sound like a good option. My only worry would be the time
> taken by extra JNI calls at the startup.
>
> I did some tests to see the impact, measuring the time between the
> StageEvent with Stage=Running and the first FrameEvent, picking the