Cursor doesn't change back to pointer when leaving the Safari window
[WebKit-https.git] / Source / WebKit / mac / WebCoreSupport / WebChromeClient.mm
index 976b7cf1f504a2b0a99a59ec9106c607da5bdab9..641249bade0987efb69c10e6af2a5908b41733c2 100644 (file)
@@ -773,10 +773,7 @@ void WebChromeClient::setCursor(const WebCore::Cursor& cursor)
         return;
 
     NSWindow *window = [m_webView window];
-    if (!window)
-        return;
-
-    if ([window windowNumber] != [NSWindow windowNumberAtPoint:[NSEvent mouseLocation] belowWindowWithWindowNumber:0])
+    if (!window || ![window isKeyWindow])
         return;
 
     NSCursor *platformCursor = cursor.platformCursor();