Skip to content

Commit

Permalink
enhance: forbid MoveWindow being called while double tap action tak…
Browse files Browse the repository at this point in the history
…ing place (#177)
  • Loading branch information
love-linger committed Jun 13, 2024
1 parent 762ec1f commit 13cc494
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Views/Blame.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,8 @@ public Blame()

private void MaximizeOrRestoreWindow(object sender, TappedEventArgs e)
{
_pressedTitleBar = false;

if (WindowState == WindowState.Maximized)
WindowState = WindowState.Normal;
else
Expand Down
2 changes: 2 additions & 0 deletions src/Views/BranchCompare.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ public BranchCompare()

private void MaximizeOrRestoreWindow(object sender, TappedEventArgs e)
{
_pressedTitleBar = false;

if (WindowState == WindowState.Maximized)
WindowState = WindowState.Normal;
else
Expand Down
2 changes: 2 additions & 0 deletions src/Views/FileHistories.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ public FileHistories()

private void MaximizeOrRestoreWindow(object sender, TappedEventArgs e)
{
_pressedTitleBar = false;

if (WindowState == WindowState.Maximized)
WindowState = WindowState.Normal;
else
Expand Down
2 changes: 2 additions & 0 deletions src/Views/Launcher.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,8 @@ protected override void OnClosing(WindowClosingEventArgs e)

private void OnTitleBarDoubleTapped(object sender, TappedEventArgs e)
{
_pressedTitleBar = false;

if (WindowState == WindowState.Maximized)
WindowState = WindowState.Normal;
else
Expand Down

0 comments on commit 13cc494

Please sign in to comment.