Browse Source

Updated runnable

Tig 1 week ago
parent
commit
900c23d86d
1 changed files with 10 additions and 10 deletions
  1. 10 10
      Terminal.Gui/ViewBase/Runnable/Runnable.cs

+ 10 - 10
Terminal.Gui/ViewBase/Runnable/Runnable.cs

@@ -170,16 +170,6 @@ public class Runnable : View, IRunnable
     /// <inheritdoc/>
     public void RaiseIsModalChangedEvent (bool newIsModal)
     {
-        // CWP Phase 3: Post-notification (work already done by Application)
-        OnIsModalChanged (newIsModal);
-
-        EventArgs<bool> args = new (newIsModal);
-        IsModalChanged?.Invoke (this, args);
-
-        // Layout may need to change when modal state changes
-        SetNeedsLayout ();
-        SetNeedsDraw ();
-
         if (newIsModal)
         {
             // Set focus to self if becoming modal
@@ -194,6 +184,16 @@ public class Runnable : View, IRunnable
                 App?.Driver?.UpdateCursor ();
             }
         }
+
+        // CWP Phase 3: Post-notification (work already done by Application)
+        OnIsModalChanged (newIsModal);
+
+        EventArgs<bool> args = new (newIsModal);
+        IsModalChanged?.Invoke (this, args);
+
+        // Layout may need to change when modal state changes
+        SetNeedsLayout ();
+        SetNeedsDraw ();
     }
 
     /// <inheritdoc/>