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

Mouse: Fix ctypes definition to work with other packages #6319

Merged
merged 3 commits into from
Jul 21, 2019

Conversation

CristiFati
Copy link
Contributor

@CristiFati CristiFati commented May 19, 2019

Same thing as [GitHub]: kivy/kivy - SetWindowLongPtrW ctypes prototype bug.

Stacktrace (partial):

...
   File "e:\Work\Dev\VEnvs\py_064_03.07.03_test0\lib\site-packages\kivy\input\providers\wm_touch.py", line 72, in update
     windll.user32.GetClientRect(self.hwnd, byref(c_rect))
 ctypes.ArgumentError: argument 2: <class 'TypeError'>: expected LP_RECT instance instead of pointer to RECT

A complete history can be found at [GitHub]: pywinauto/pywinauto - ctypes.ArgumentError @ click_input:

  • This error was encountered in the past, and was fixed (on the other side) by switching to PyWin32
  • Then it was switched back, and the error reappears

The investigation and example can be found at [SO]: ctypes.ArgumentError when using kivy with pywinauto (@CristiFati's answer).

This PR works in conjunction with [GitHub]: pywinauto/pywinauto - ctypes adaptations in order to work with other packages (changes from both PRs are required for the error to be fixed - stating the obvious: they won't make any difference if yet another module is in the same situation).

Copy link
Member

@matham matham left a comment

Choose a reason for hiding this comment

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

Seems ok, but I didn't test.

@matham matham merged commit 11409d7 into kivy:master Jul 21, 2019
@matham matham added this to the 2.0.0 milestone Oct 28, 2020
@matham matham changed the title ctypes adaptations in order to work with other packages Mouse: Fix ctypes definition to work with other packages Nov 14, 2020
@matham matham added the Component: input kivy/input label Nov 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants