Skip to content

Fix mouse getting grabbed outside window of the game#629

Closed
KKNecmi wants to merge 9 commits intosmartcmd:mainfrom
KKNecmi:main
Closed

Fix mouse getting grabbed outside window of the game#629
KKNecmi wants to merge 9 commits intosmartcmd:mainfrom
KKNecmi:main

Conversation

@KKNecmi
Copy link
Contributor

@KKNecmi KKNecmi commented Mar 5, 2026

Description

If User uses Windows64 when a ui opens like a furnace does grab(limit your mouse area) your mouse it checks if game in front of the screen if not disable grabbing
https://github.com/user-attachments/assets/70971d59-bcd6-42be-aa04-cfd0227e8112

Changes

Edited KeyboardMouseInput.cpp & KeyboardMouseInput.h

Previous Behavior

Alt tabbing causes mouse stuck at center of the screen

Root Cause

if a ui is open it doesnt check if game is on the screen so it limits everytime effects outside of the game

New Behavior

if a ui is open it checks if the app window in front of the screen if not dont grab mouse

Fix Implementation

added a bool to check if app window in front and use this on tick with ifdef _Windows64 check window if its outside game dont grab if its not grab it

AI Use Disclosure

i used Ai to found the class grabs the mouse so i dont need to look every part of the code

Related Issues

  • Fixes No opened issue
  • Related to Nothing

@KKNecmi
Copy link
Contributor Author

KKNecmi commented Mar 6, 2026

with less file edited this already been done on #612

@KKNecmi KKNecmi closed this Mar 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant