gpui: Implement hover for Windows (#20894)

This commit is contained in:
Matin Aniss 2024-11-29 03:45:10 +11:00 committed by GitHub
parent 301a8900a5
commit 4a96db026c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 50 additions and 5 deletions

View file

@ -1241,7 +1241,11 @@ impl<'a> WindowContext<'a> {
/// that currently owns the mouse cursor.
/// On mac, this is equivalent to `is_window_active`.
pub fn is_window_hovered(&self) -> bool {
if cfg!(any(target_os = "linux", target_os = "freebsd")) {
if cfg!(any(
target_os = "windows",
target_os = "linux",
target_os = "freebsd"
)) {
self.window.hovered.get()
} else {
self.is_window_active()