Enabling OpenGL display, causes different behavior for system events

Issue #40 wontfix
René Dudfield
created an issue

== Thomas Hansen, 2009-11-20 21:12:38 -0800

{{{ 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 }}}

Comments (2)

  1. Log in to comment