Closed Tyreens closed 3 years ago
This should solve it:
protected virtual void InitDragMoveThumb(FrameworkElement dragMoveThumb)
{
dragMoveThumb.MouseLeftButtonDown += (s, e) =>
{
if (e.ChangedButton == MouseButton.Left && e.ClickCount == 1)
{
if (WindowState == WindowState.Maximized)
dragMoveThumb.MouseMove += RestoreOnMouseMove;
if (Mouse.LeftButton == MouseButtonState.Pressed)
DragMove();
}
if (e.ClickCount == 2 &&
(ResizeMode == ResizeMode.CanResize || ResizeMode == ResizeMode.CanResizeWithGrip))
{
ToggleWindowState();
}
};
dragMoveThumb.MouseLeftButtonUp += (s, e) => dragMoveThumb.MouseMove -= RestoreOnMouseMove;
dragMoveThumb.MouseRightButtonUp += (s, e) => OpenSystemContextMenu(e.GetPosition(this));
}
Yes, that seems to behave a little incorrect. Thanks for reporting!
@benruehl Can I make a PR?
@oriash93 Yes of course, please go ahead :)
Hi,
there is a bug when you minimizing the "AdonisWindow" with a double click on the titlebar. The window will jump to the mouse cursor after minimizing when you enter the title bar of the window with your mouse.
To Reproduce Steps to reproduce the behavior:
Expected behavior Window does not change the position after minimizing followed by moving the mouse over the title bar.