* 获取鼠标所在显示器的工作区尺寸和位置
()
| 256 | * 获取鼠标所在显示器的工作区尺寸和位置 |
| 257 | */ |
| 258 | private getDisplayAtCursor(): { |
| 259 | width: number |
| 260 | height: number |
| 261 | x: number |
| 262 | y: number |
| 263 | id: number |
| 264 | } { |
| 265 | const cursorPoint = screen.getCursorScreenPoint() |
| 266 | const display = screen.getDisplayNearestPoint(cursorPoint) |
| 267 | return { |
| 268 | ...display.workArea, |
| 269 | id: display.id |
| 270 | } |
| 271 | } |
| 272 | |
| 273 | /** |
| 274 | * 获取当前显示器 ID(基于窗口位置) |
no outgoing calls
no test coverage detected