Skip to content

Commit

Permalink
FlyleafHost.Wpf: Fixes a possible issue with normal/fullscreen (Relat…
Browse files Browse the repository at this point in the history
…ed to #498)
  • Loading branch information
SuRGeoNix committed Oct 22, 2024
1 parent a5db0ee commit df14304
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions FlyleafLib/Controls/WPF/FlyleafHost.cs
Original file line number Diff line number Diff line change
Expand Up @@ -877,7 +877,7 @@ private void SetCornerRadiusBorder()
// This does not set the background color we do that with the renderer (which causes some issues eg. when returning from fullscreen to normalscreen)
Surface.Content = new Border()
{
Background = Brushes.Black,
Background = Brushes.Black, // TBR: for alpha channel -> Background == Brushes.Transparent || Background ==null ? new SolidColorBrush(Color.FromArgb(1,0,0,0)) : Background
HorizontalAlignment = HorizontalAlignment.Stretch,
VerticalAlignment = VerticalAlignment.Stretch,
CornerRadius = CornerRadius,
Expand Down Expand Up @@ -2172,7 +2172,8 @@ public void RefreshNormalFullScreen()
}
else
{
Surface.WindowState = WindowState.Normal;
if (IsStandAlone)
Surface.WindowState = WindowState.Normal;

if (IsAttached)
{
Expand All @@ -2193,6 +2194,9 @@ public void RefreshNormalFullScreen()

if (CornerRadius != zeroCornerRadius)
((Border)Surface.Content).CornerRadius = CornerRadius;

if (!IsStandAlone) //when play with alpha video and not standalone, we need to set window state to normal last, otherwise it will be lost the background
Surface.WindowState = WindowState.Normal;
}
}
public void SetRect(ref Rect rect)
Expand Down

0 comments on commit df14304

Please sign in to comment.