Revision: 2789614be547
Author: Andreas Schiefer <andreas.schie...@gmail.com>
Date: Sun Aug 5 01:19:45 2012
Log: Fix window not always showing on Windows (fix by Joe Esposito)
http://code.google.com/p/pyglet/source/detail?r=2789614be547
Modified:
/pyglet/window/win32/__init__.py
=======================================
--- /pyglet/window/win32/__init__.py Mon Jul 16 10:29:50 2012
+++ /pyglet/window/win32/__init__.py Sun Aug 5 01:19:45 2012
@@ -350,11 +350,9 @@
def set_visible(self, visible=True):
if visible:
- if self._fullscreen:
- _user32.SetWindowPos(self._hwnd, HWND_TOPMOST, 0, 0, 0, 0,
- SWP_NOMOVE | SWP_NOSIZE | SWP_SHOWWINDOW)
- else:
- _user32.ShowWindow(self._hwnd, SW_SHOW)
+ insertAfter = HWND_TOPMOST if self._fullscreen else HWND_TOP
+ _user32.SetWindowPos(self._hwnd, insertAfter, 0, 0, 0, 0,
+ SWP_NOMOVE | SWP_NOSIZE | SWP_SHOWWINDOW)
self.dispatch_event('on_show')
self.activate()
else: