hi, opengl uses a slighty different video and event driver. So that explains the different behaviour.
probably have a better chance of it getting fixed if you report your bug here: bugzilla.libsdl.org I'm guessing that the stylus uses a different method of updating the mouse position... and the opengl method of getting events is not working. Maybe a work around would be to use pygame.mouse.get_pos() ? cu, On Sat, Nov 21, 2009 at 6:27 AM, Thomas Hansen <thomas.han...@gmail.com> wrote: > If I enable OpenGL on my display, teh evebnt system starts behaving > differntly. > The following code prints all the events I am interrested in if i do > not > enable OpenGL. If I enable it however, events from the touchscreen > and stylus > are not reaching the event queue. > > Note that this also happens for the simulated mouse events that > windows > generates for these input devices. When I dont enable OpenGL, and just > get the > normal mouse events (no fancy windows touchwindow, or using > pymt.SYWMEVENT), > everything is fine. If I enable OpenGL however, mouse events are not > generated > when I use touch or stylus (although they move/controll the system > mouse > cursor) > > I am using pygame 1.9.1 with Python 2.6.2 on Windows 7. > > > import pygame > import ctypes > > #if I uncomment this line, the window does not produce teh same events > #without it it works just fine!! > #display_flag = pygame.OPENGL > > pygame.display.quit() > pygame.display.init() > pygame.display.set_mode((320, 240) display_flag) > pygame.event.set_allowed(pygame.SYSWMEVENT) > > pygame.display.set_caption('pymt') > hwnd = ctypes.windll.user32.FindWindowA(None, "pymt") > ctypes.windll.user32.RegisterTouchWindow(hwnd, 0) > > while True: > for event in pygame.event.get(): > if event.type == pygame.SYSWMEVENT: > print event >