[pyglet] push by andreas....@gmail.com - Fix window not always showing on Windows (fix by Joe Esposito) on 2012-08-05 08:20 GMT

7 views
Skip to first unread message

pyg...@googlecode.com

unread,
Aug 5, 2012, 4:20:51 AM8/5/12
to pyglet-...@googlegroups.com
Revision: 2789614be547
Author: Andreas Schiefer <andreas....@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:
Reply all
Reply to author
Forward
0 new messages