Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: handle WM_LBUTTONDOWN WM_LBUTTONUP in Win32 #5765

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

H999
Copy link

@H999 H999 commented Jan 17, 2025

Recently, I have been using your repo and noticed that it does not support WM_LBUTTONDOWN and WM_LBUTTONUP events in Win32. While searching through the SDL library, I found that these events can be supported by enabling SDL_EventState(SDL_SYSWMEVENT, SDL_ENABLE). I tested this on my device, and it worked stably and met my needs. However, I'm not sure if there could be any negative consequences from using it more widely. Could you consider enhancing the functionality in your repo to include this, as well as potentially other related features?

Here my tested code and I tested with SamSung touch screen diagnostic (SamSung M21):

hwnd = win32gui.FindWindow(None, "")
x=400
y=400
win32gui.PostMessage(hwnd, win32con.WM_LBUTTONDOWN, 0, (y << 16) | x)
win32gui.PostMessage(hwnd, win32con.WM_LBUTTONUP, None, (y << 16) | x)

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