目录

Window Focus

When to Use

Window Focus refers to the state of a window within a screen group that is currently capable of receiving keyboard events. The system uses the focus mechanism to ensure that user input is correctly routed to the target UI component.

Within a screen group, there is one and only one window in the focus state, which is called the Focus Window. The focus window can not only respond to keyboard input but also enjoy higher priority in resource scheduling, such as receiving system preference in rendering and task execution. The system can only bring up the input method for text entry after the window successfully gains focus.

Basic Concepts and Mechanism Introduction

[h2]Screen Group

A screen group is a set of logically associated display areas in the system, with each screen group independently maintaining its window stack and focus state. Each screen group has one and only one focus window, and the focus states of different screen groups do not affect each other.

[h2]Window Focus State

Window focus state indicates whether the current window can receive user input events (such as click and key press).

[h2]Window Highlight State Management

Window Highlight State indicates whether the current window is in a visual highlight state. Visual highlight is a UI feedback mechanism that communicates to the user that this window is currently active, interactive, or being emphasized by the system by changing the window's appearance (such as title bar color, border style, transparency, and shadow).