Skip to content

Commit

Permalink
chore: subscribe to ExtendViewIntoTitleBarChanged on gtk
Browse files Browse the repository at this point in the history
  • Loading branch information
ramezgerges committed Apr 10, 2024
1 parent 05f6502 commit cb50e60
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Uno.UI.Runtime.Skia.Gtk/UI/Controls/UnoGtkWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ public UnoGtkWindow(WinUIWindow winUIWindow, Microsoft.UI.Xaml.XamlRoot xamlRoot

_applicationView = ApplicationView.GetForWindowId(winUIWindow.AppWindow.Id);
_applicationView.PropertyChanged += OnApplicationViewPropertyChanged;
CoreApplication.GetCurrentView().TitleBar.ExtendViewIntoTitleBarChanged += UpdateWindowPropertiesFromCoreApplication;
Destroyed += UnoGtkWindow_Destroyed;
Shown += UnoGtkWindow_Shown;
UpdateWindowPropertiesFromPackage();
Expand All @@ -71,6 +72,7 @@ public UnoGtkWindow(WinUIWindow winUIWindow, Microsoft.UI.Xaml.XamlRoot xamlRoot
private void UnoGtkWindow_Destroyed(object? sender, EventArgs e)
{
_applicationView.PropertyChanged -= OnApplicationViewPropertyChanged;
CoreApplication.GetCurrentView().TitleBar.ExtendViewIntoTitleBarChanged -= UpdateWindowPropertiesFromCoreApplication;
}

internal UnoGtkWindowHost Host { get; }
Expand Down

0 comments on commit cb50e60

Please sign in to comment.