@@ -26,6 +26,11 @@ public ChromelessWindow()
2626 {
2727 Focusable = true ;
2828 Native . OS . SetupForWindow ( this ) ;
29+
30+ if ( OperatingSystem . IsLinux ( ) && ! UseSystemWindowFrame )
31+ {
32+ PositionChanged += ( _ , _ ) => Native . LinuxUtilities . UpdateCustomWindowFrameStyle ( this ) ;
33+ }
2934 }
3035
3136 public void BeginMoveWindow ( object _ , PointerPressedEventArgs e )
@@ -81,6 +86,16 @@ protected override void OnLoaded(RoutedEventArgs e)
8186
8287 if ( OperatingSystem . IsWindows ( ) )
8388 Native . Win64Utilities . FixWindowFrame ( this ) ;
89+ else if ( OperatingSystem . IsLinux ( ) )
90+ Native . LinuxUtilities . UpdateCustomWindowFrameStyle ( this ) ;
91+ }
92+
93+ protected override void OnSizeChanged ( SizeChangedEventArgs e )
94+ {
95+ base . OnSizeChanged ( e ) ;
96+
97+ if ( OperatingSystem . IsLinux ( ) )
98+ Native . LinuxUtilities . UpdateCustomWindowFrameStyle ( this ) ;
8499 }
85100
86101 protected override void OnPropertyChanged ( AvaloniaPropertyChangedEventArgs change )
@@ -89,6 +104,15 @@ protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs chang
89104
90105 if ( OperatingSystem . IsWindows ( ) && change . Property == WindowStateProperty )
91106 Native . Win64Utilities . FixWindowFrame ( this ) ;
107+ else if ( OperatingSystem . IsLinux ( ) &&
108+ Classes . Contains ( "custom_window_frame" ) &&
109+ ( change . Property == WindowStateProperty ||
110+ change . Property == BoundsProperty ||
111+ change . Property == WidthProperty ||
112+ change . Property == HeightProperty ) )
113+ {
114+ Native . LinuxUtilities . UpdateCustomWindowFrameStyle ( this ) ;
115+ }
92116 }
93117
94118 protected override void OnKeyDown ( KeyEventArgs e )
0 commit comments