~eliasnaur/gio

1

Screen orientation and webview plugin

Details
Message ID
<c860fccf-26c8-4c14-bb91-098b2743ac4a@cadoles.com>
DKIM signature
pass
Download raw message
Hello everyone!

First of all, thank you for this incredible project!

I have a question about how orientation works on Android apps. I'm 
currently working on a project using the “webviewer” plugin 
(https://pkg.go.dev/github.com/gioui-plugins/gio-plugins/webviewer) and 
I can't get the resizing of the webview to work correctly when switching 
the phone. After the initial rendering, the webview component always 
seems to be “one frame behind” in its renderer dimensions.

I reproduce the same behavior with the demo application available here: 
https://github.com/gioui-plugins/gio-plugins/tree/main/webviewer/demo.

Is there a trick to getting the orientation management to work as expected?

Thanks in advance!

William

-- 
William Petit
Développeur logiciels libres


          Cadoles
{{ La liberté est un choix }}

http://www.cadoles.com
+33 3 73 27 02 86
+33 7 49 92 99 67
170 Avenue Jean Jaurès, 21000 Dijon
Details
Message ID
<7486ef27-8004-47c4-b3c9-63706c17fc31@app.fastmail.com>
In-Reply-To
<c860fccf-26c8-4c14-bb91-098b2743ac4a@cadoles.com> (view parent)
DKIM signature
pass
Download raw message
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 
reproduce and prevent regression.

The webview experiences known delays due to its scheduling system,
which does not synchronise with "FrameEvents". Creating a better
integration of "external view canvas" (like video players, webviews, and 
cameras) with Gio is a complex task that has yet to be fully addressed.

I'm not aware of any fix for that issue, right now. My priority is bring 
gio-plugins compatible to Gio 0.6 (which also means that the app itself 
must migrates to 0.6). If I have time, I might take a look into that orientation 
issue and check if exists any bug related to the current internal scheduler. :)

-- 
  Lucas Rodrigues
  inkeliz@inkeliz.com

On Thu, Apr 25, 2024, at 5:42 PM, William Petit wrote:
> Hello everyone!
>
> First of all, thank you for this incredible project!
>
> I have a question about how orientation works on Android apps. I'm 
> currently working on a project using the “webviewer” plugin 
> (https://pkg.go.dev/github.com/gioui-plugins/gio-plugins/webviewer) and 
> I can't get the resizing of the webview to work correctly when switching 
> the phone. After the initial rendering, the webview component always 
> seems to be “one frame behind” in its renderer dimensions.
>
> I reproduce the same behavior with the demo application available here: 
> https://github.com/gioui-plugins/gio-plugins/tree/main/webviewer/demo.
>
> Is there a trick to getting the orientation management to work as expected?
>
> Thanks in advance!
>
> William
>
> -- 
> William Petit
> Développeur logiciels libres
>
>
>           Cadoles
> {{ La liberté est un choix }}
>
> http://www.cadoles.com
> +33 3 73 27 02 86
> +33 7 49 92 99 67
> 170 Avenue Jean Jaurès, 21000 Dijon
Reply to thread Export thread (mbox)