소스 검색

[macOS] Update entered state from `mouseMoved`.

Pāvels Nadtočajevs 4 달 전
부모
커밋
152423230c
1개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  1. 5 0
      platform/macos/godot_content_view.mm

+ 5 - 0
platform/macos/godot_content_view.mm

@@ -515,6 +515,11 @@
 	mm->set_relative_screen_position(relativeMotion);
 	ds->get_key_modifier_state([event modifierFlags], mm);
 
+	const NSRect contentRect = [wd.window_view frame];
+	if (NSPointInRect([event locationInWindow], contentRect)) {
+		ds->mouse_enter_window(window_id);
+	}
+
 	Input::get_singleton()->parse_input_event(mm);
 }