Table of Contents

Property IsModal

Namespace
Terminal.Gui.App
Assembly
Terminal.Gui.dll

IsModal

Gets whether this runnable session is at the top of the SessionStack and thus exclusively receiving mouse and keyboard input.

bool IsModal { get; }

Property Value

bool

Remarks

This property returns a cached value that is updated atomically when the runnable's modal state changes. The cached state ensures thread-safe access without race conditions.

Returns true if this runnable is at the top of the stack (i.e., this == app.TopRunnable), false otherwise.

The runnable at the top of the stack gets all mouse/keyboard input and thus is running "modally".