Skip to content

Remove viewport focus check from MapView _process#673

Open
Catylist0 wants to merge 1 commit into
masterfrom
fix/map-province-hover-notifications
Open

Remove viewport focus check from MapView _process#673
Catylist0 wants to merge 1 commit into
masterfrom
fix/map-province-hover-notifications

Conversation

@Catylist0
Copy link
Copy Markdown

Summary

  • Remove the per-frame viewport focus / is_input_handled() check from MapView._process that was clearing province hover.
  • Track mouse presence over the map via NOTIFICATION_WM_MOUSE_ENTER and NOTIFICATION_WM_MOUSE_EXIT instead.

Made with Cursor

Stop clearing province hover based on window focus and input handling in _process; use mouse enter/exit notifications instead.

Co-authored-by: Cursor <cursoragent@cursor.com>
@Catylist0 Catylist0 requested a review from a team as a code owner May 20, 2026 12:46
if _cardinal_movement_vector != Vector2.ZERO and get_window().gui_get_focus_owner() != null:
_cardinal_movement_vector = Vector2.ZERO

if _is_viewport_inactive():
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this case handled via the NOTIFICATION_WM_MOUSE_EXIT?
The old code implies it wasn't.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be now, in the old code we weren't catching the on exit stuff iirc, it was just doing a check each tick. Not sure why it was like that, this system should be more correct(?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants