# gpui: Fix cursor styles not applying to panel-backed windows \(\#58493\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/96165ec62647cb5db0a5cf1c57214f2970c6eda4)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 96165ec62647cb5db0a5cf1c57214f2970c6eda4

Requested commit: 96165ec62647cb5db0a5cf1c57214f2970c6eda4

Commit: 96165ec62647cb5db0a5cf1c57214f2970c6eda4

Tree: 792fc9eee3699c8d59b4c244c4643a4740d871cf

Author: Floyd Wang

Committer: GitHub

## Message

```
gpui: Fix cursor styles not applying to panel-backed windows (#58493)

`set_active_window_cursor_style` only matched `WINDOW_CLASS` (used by
`WindowKind::Normal`). Panel-backed windows
(`Floating`/`Dialog`/`PopUp`) use the sibling `PANEL_CLASS`, so the
check failed for them: a focused panel fell through to `mainWindow`,
applying the cursor to the wrong window and leaving `cursor_pointer()`
with no visible effect.

Add an `is_gpui_window` helper that accepts both classes (both carry
`WINDOW_STATE_IVAR`) and use it to resolve the active window.

### Before


https://github.com/user-attachments/assets/f1bf820e-7af8-44f2-bfcd-d51e60706454

### After


https://github.com/user-attachments/assets/d4fa319d-029d-4516-922e-70ed753fa90a

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [ ] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable
```

## Parents

- [b3bc83b57e746001fdbbac5c01fa321c3eecb7fe](https://git.cafe/gitcafe/zed/commit/b3bc83b57e746001fdbbac5c01fa321c3eecb7fe?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/96165ec62647cb5db0a5cf1c57214f2970c6eda4?format=markdown)
