Prevent display update during window resizing in TerminalProcess

This commit is contained in:
Stone_Red
2026-06-12 01:35:27 +02:00
parent f15784160d
commit 5a7b1d1f97
2 changed files with 4 additions and 1 deletions
+1 -1
View File
@@ -37,7 +37,7 @@ public class TerminalProcess() : Process("Terminal")
internal override void Tick()
{
if (window.Size != lastSize)
if (window.Size != lastSize && !window.IsResizing)
{
lastSize = window.Size;
UpdateDisplay();
+3
View File
@@ -58,6 +58,9 @@ public sealed class Window(string title, int processId, int id, IRenderSource re
/// <summary> Gets whether the window is currently being dragged. </summary>
public bool IsDragging => currentInteraction == InteractionMode.Drag;
/// <summary> Gets whether the window is currently being resized. </summary>
public bool IsResizing => currentInteraction is InteractionMode.ResizeTop or InteractionMode.ResizeBottom or InteractionMode.ResizeLeft or InteractionMode.ResizeRight or InteractionMode.ResizeTopLeft or InteractionMode.ResizeTopRight or InteractionMode.ResizeBottomLeft or InteractionMode.ResizeBottomRight;
private readonly Lock uiElementsLock = new();
private readonly Dictionary<int, UIElement> uiElements = [];