diff --git a/ShiftOS.Frontend/Desktop/WindowManager.cs b/ShiftOS.Frontend/Desktop/WindowManager.cs index 01ebe7f..f1ca59b 100644 --- a/ShiftOS.Frontend/Desktop/WindowManager.cs +++ b/ShiftOS.Frontend/Desktop/WindowManager.cs @@ -180,6 +180,19 @@ namespace ShiftOS.Frontend.Desktop public WindowBorder() { + Click += () => + { + var cbtnloc = LoadedSkin.CloseButtonFromSide; + var realcloc = new Vector2( + (LoadedSkin.TitleButtonPosition == 1) ? cbtnloc.X : (Width - LoadedSkin.TitleLeftCornerWidth - LoadedSkin.TitleRightCornerWidth) - cbtnloc.X, + cbtnloc.Y + ); + var cbtnsize = LoadedSkin.CloseButtonSize; + if(MouseX >= realcloc.X && MouseY >= realcloc.Y && MouseX <= realcloc.X + cbtnsize.Width && MouseY <= realcloc.Y + cbtnsize.Height) + { + AppearanceManager.Close(ParentWindow); + } + }; X = 720; Y = 480; }