Igalia / wolvic

A fast and secure browser for standalone virtual-reality and augmented-reality headsets.
https://wolvic.org
Mozilla Public License 2.0
796 stars 100 forks source link

[Vision Glass] Fix size of windows and dialogs #1334

Closed felipeerias closed 5 months ago

felipeerias commented 5 months ago

This PR overwrites some of the default dimensions for Vision Glass so windows and dialogs will fit better in the small screen space available.

Vision Glass will also use a density of 1.0 by default, same as HVR.

Fixes https://github.com/Igalia/wolvic/issues/1275

felipeerias commented 5 months ago

The problem with the launch dialogs is a strange race condition inadvertently introduced by https://github.com/Igalia/wolvic/pull/1241

In that PR we linked the default distance to the output of DeviceType.getType() which returns Unknown at launch time because it needs to wait until BrowserWorld::InitializeJava calls VRBrowserActivity.setDeviceType().

One way to fix this is simply to add a delay before displaying the launch dialogs.

Another one is to turn the default window distance into a build variable. This second option seems preferable.