• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Window Subsystem Changelog
2
3## cl.window.1 Optimized getWindowProperties by Improving the Real-Time Accuracy of the drawableRect Value Returned
4
5**Access Level**
6
7Public API
8
9**Reason for Change**
10
11An application calls **getWindowProperties** to obtain the window properties, including the drawable area specified by the **drawableRect** field. However, if **getWindowproperties** is called in the **on('windowSizeChange')** callback, **drawableRect** in the return value might reflect outdated information.
12With this update, the **on('windowSizeChange')** callback now simultaneously refreshes both **windowRect** and **drawableRect**, so the application can perform more flexible self-drawing layout.
13
14**Change Impact**
15
16This change is a non-compatible change.
17
18Before the change: If **getWindowProperties** is called in the **on('windowSizeChange')** callback, the **drawableRect** field in the return value might reflect outdated information.
19
20After the change: If **getWindowProperties** is called in the **on('windowSizeChange')** callback, the **drawableRect** field in the return value reflects the real-time information.
21
22**Start API Level**
23
2411
25
26**Change Since**
27
28OpenHarmony SDK 5.0.0.45
29
30**Key API/Component Changes**
31
32@ohos.window.d.ts
33
34**System capability**: SystemCapability.WindowManager.WindowManager.Core
35
36**API**: getWindowProperties
37
38**Adaptation Guide**
39
40The **drawableRect** field is provided since API version 11.
41
42In API versions 11 and 12, you are not advised to use this field for layout. You can perform layout based on **windowRect**.
43
44In API version 13 and later versions, you are advised to use this field for precise layout.
45