Skip to content

Commit

Permalink
Merge pull request #1190 from kusma/fix-issue-1186
Browse files Browse the repository at this point in the history
Revert " fixes #1096"
  • Loading branch information
kusma authored May 24, 2018
2 parents fb3ccad + 295b3d3 commit 0b4fa39
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 59 deletions.
3 changes: 2 additions & 1 deletion Source/Fuse.Android/AndroidApp.uno
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ namespace Fuse

Uno.Platform.Displays.MainDisplay.Tick += OnTick;
}

public sealed override IList<Node> Children
{
get { return RootVisual.Children; }
Expand All @@ -66,6 +66,7 @@ namespace Fuse

void OnTick(object sender, Uno.Platform.TimerEventArgs args)
{
RootViewport.InvalidateLayout();
try
{
PropagateBackground();
Expand Down
7 changes: 3 additions & 4 deletions Source/Fuse.Controls.Native/Fuse.Controls.Native.unoproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,13 @@
"Uno.Threading",
],
"Projects": [
"../Fuse.Common/Fuse.Common.unoproj",
"../Fuse.Drawing.Surface/Fuse.Drawing.Surface.unoproj",
"../Fuse.Drawing/Fuse.Drawing.unoproj",
"../Fuse.Drawing.Planar/Fuse.Drawing.Planar.unoproj",
"../Fuse.Drawing.Surface/Fuse.Drawing.Surface.unoproj",
"../Fuse.Triggers/Fuse.Triggers.unoproj",
"../Fuse.Elements/Fuse.Elements.unoproj",
"../Fuse.Nodes/Fuse.Nodes.unoproj",
"../Fuse.Platform/Fuse.Platform.unoproj",
"../Fuse.Triggers/Fuse.Triggers.unoproj",
"../Fuse.Common/Fuse.Common.unoproj",
],
"Includes": [
"*",
Expand Down
7 changes: 0 additions & 7 deletions Source/Fuse.Controls.Native/NativeRootViewport.uno
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,5 @@ namespace Fuse.Controls.Native
{
_rootView = rootView;
}

extern(Android)
internal override bool IsViewportReady
{
get { return Fuse.Platform.SystemUI.IsReady; }
}

}
}
8 changes: 1 addition & 7 deletions Source/Fuse.Nodes/RootViewport.uno
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,9 @@ namespace Fuse
OnInvalidateLayout();
}

internal virtual bool IsViewportReady
{
get { return true; }
}

protected override void OnInvalidateLayout()
{
if (IsViewportReady)
UpdateManager.AddOnceAction(PerformLayout, UpdateStage.Layout);
UpdateManager.AddOnceAction(PerformLayout, UpdateStage.Layout);
}

void IDisposable.Dispose()
Expand Down
23 changes: 16 additions & 7 deletions Source/Fuse.Platform/Android/SystemUI.uno
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,16 @@ namespace Fuse.Platform
static public Rect Frame
{
get { return _frame; }
private set
{
if (Rect.Equals(_frame, value))
return;

_frame = value;
OnFrameChanged();
}
}

//Whenever frame changes, includes IsReady status change
static public event EventHandler FrameChanged;
static private void OnFrameChanged()
{
Expand Down Expand Up @@ -438,21 +445,23 @@ namespace Fuse.Platform
@}


static internal bool IsReady { get; private set; }

[Require("Source.Include", "Uno/Graphics/GLHelper.h")]
static void cppOnConfigChanged()
{
extern "GLHelper::SwapBackToBackgroundSurface()";

ResetGeometry();
}

[Require("Source.Include", "Uno/Graphics/GLHelper.h")]
static void ResetGeometry()
{
extern "GLHelper::SwapBackToBackgroundSurface()";
var density = GetDensity();
var pos = float2(0f, 0f);
var size = _GetRootDisplaySize();
var frame = new Rect(pos, size);
Frame = frame;
Density = density;
_frame = frame;
IsReady = true;
OnFrameChanged();
}

[Foreign(Language.Java)]
Expand Down
1 change: 0 additions & 1 deletion Source/Fuse.Platform/Fuse.Platform.unoproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
"Fuse.Views",
"Fuse.Android",
"Fuse.Common",
"Fuse.Controls.Native",
"Fuse.Controls.Panels",
"Fuse.Controls.WebView",
"Fuse.Elements",
Expand Down
22 changes: 0 additions & 22 deletions Tests/ManualTests/ManualTestingApp/InterceptPanel.uno

This file was deleted.

10 changes: 1 addition & 9 deletions Tests/ManualTests/ManualTestingApp/TestApp.ux
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,7 @@
<!-- Leave as 0.0.0.0, the resource is updated by set_version.sh on a release -->
<string ux:Key="ResourceString" ux:Value="0.0.0.0"/>

<!-- This will detect some invalid rooting/setup: it checks the symptom of getting a 0,0 size -->
<InterceptPanel Invalid="whenInvalid"><!-- Also checks root test with multiple children -->
<WhileTrue Value="false" ux:Name="whenInvalid">
<Panel Color="#8008">
<Text FontSize="64" Value="Invalid Bootstrap"/>
</Panel>
</WhileTrue>
</InterceptPanel>

<Panel ux:Name="SoRootTestChecksMultipleChildren"/>
<TestAppTheme/>
<MainView/>
</App>
1 change: 0 additions & 1 deletion Tests/ManualTests/ManualTestingApp/UnoComponents.unoproj
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
"HttpXml/HttpXmlView.ux:UX",
"HttpXml/ResultItem.ux.uno:Source",
"HttpXml/ResultItem.ux:UX",
"InterceptPanel.uno:Source",
"IsEnabled/IsEnabled2.ux:UX",
"IsEnabled/IsEnabled.ux.uno:Source",
"IsEnabled/IsEnabled.ux:UX",
Expand Down

0 comments on commit 0b4fa39

Please sign in to comment.