File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 2727def GetCursorPos ():
2828 point = (c_ulong * 2 )()
2929 windll .user32 .GetCursorPos (byref (point ))
30- return point
30+ return [ int ( i ) for i in point ]
3131def GetWindowRect (hwnd ):
3232 rect = (c_ulong * 4 )()
3333 windll .user32 .GetWindowRect (hwnd , byref (rect ))
34- return rect
34+ return [ int ( i ) for i in rect ]
3535
3636init_matplotlib_EventHandler = """try:
3737 import matplotlib
@@ -177,8 +177,8 @@ def onBufferActivated(self, args):
177177
178178 def onTimer (self ):
179179 self .timerCount += 1
180- middleButton = GetKeyState (VK_MBUTTON )
181- if middleButton < 0 and self . middleButton >= 0 :
180+ middleButton = GetKeyState (VK_MBUTTON ) & ( - 127 + 32768 ) > 1
181+ if middleButton :
182182 x ,y = GetCursorPos ()
183183 hwnd = WindowFromPoint (x ,y )
184184 x0 ,y0 ,x1 ,y1 = GetWindowRect (hwnd )
You can’t perform that action at this time.
0 commit comments