Cursor doesn't change back to pointer when leaving the Safari window
[WebKit-https.git] / Source / WebKit2 / UIProcess / mac / PageClientImpl.mm
index 81c19c7f4c62687a54973b5e27865b12316177d1..9a1e75e1f8318b6861eddec09d28d87d4c38e47d 100644 (file)
@@ -324,10 +324,7 @@ void PageClientImpl::setCursor(const WebCore::Cursor& cursor)
         return;
 
     NSWindow *window = [m_wkView window];
-    if (!window)
-        return;
-
-    if ([window windowNumber] != [NSWindow windowNumberAtPoint:[NSEvent mouseLocation] belowWindowWithWindowNumber:0])
+    if (!window || ![window isKeyWindow])
         return;
 
     NSCursor *platformCursor = cursor.platformCursor();