From 50ec4da4cd3b08a53f60b2ec5c5c8e4e008d5b15 Mon Sep 17 00:00:00 2001 From: Dan Walmsley Date: Tue, 16 Jun 2020 15:01:53 -0300 Subject: [PATCH] dont keep capture when minimising. --- src/Avalonia.Controls/Chrome/CaptionButtons.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Avalonia.Controls/Chrome/CaptionButtons.cs b/src/Avalonia.Controls/Chrome/CaptionButtons.cs index 99db4e550b..58f5b09c0d 100644 --- a/src/Avalonia.Controls/Chrome/CaptionButtons.cs +++ b/src/Avalonia.Controls/Chrome/CaptionButtons.cs @@ -54,10 +54,10 @@ namespace Avalonia.Controls.Chrome var minimiseButton = e.NameScope.Find("PART_MinimiseButton"); var fullScreenButton = e.NameScope.Find("PART_FullScreenButton"); - closeButton.PointerPressed += (sender, e) => _hostWindow.Close(); - restoreButton.PointerPressed += (sender, e) => _hostWindow.WindowState = _hostWindow.WindowState == WindowState.Maximized ? WindowState.Normal : WindowState.Maximized; - minimiseButton.PointerPressed += (sender, e) => _hostWindow.WindowState = WindowState.Minimized; - fullScreenButton.PointerPressed += (sender, e) => _hostWindow.WindowState = _hostWindow.WindowState == WindowState.FullScreen ? WindowState.Normal : WindowState.FullScreen; + closeButton.PointerReleased += (sender, e) => _hostWindow.Close(); + restoreButton.PointerReleased += (sender, e) => _hostWindow.WindowState = _hostWindow.WindowState == WindowState.Maximized ? WindowState.Normal : WindowState.Maximized; + minimiseButton.PointerReleased += (sender, e) => _hostWindow.WindowState = WindowState.Minimized; + fullScreenButton.PointerReleased += (sender, e) => _hostWindow.WindowState = _hostWindow.WindowState == WindowState.FullScreen ? WindowState.Normal : WindowState.FullScreen; } } }